Alright, then I would like to announce that everyone who's interested in this option (like Thomas Martitz) can feel free to contact me and get the latest version of the patch. But please note that this is distributed "as is" and is not intended to provide any features more advanced than just "open - replace some bytes - save".
-----Original Message----- From: Enrico Tr?ger enrico.troeger@uvena.de To: geany-devel@uvena.de Date: Sun, 7 Feb 2010 19:54:07 +0100 Subject: Re: [Geany-devel] Binary files - a hangup fix and some more
On Sat, 06 Feb 2010 19:37:53 +0300, Алексей wrote:
Could you provide a test case to reproduce the problem?
Take some binary/malformed file (a small ZIP archive is a good example) and try opening it with the latest SVN version of Geany (that can ocassionaly happen). You'll get a hangup with 100% CPU usage. If it is OK, try setting a "Default charset for opening files" to some 1-byte charset (e.g. ISO-8859-1).
Ok, got it. Committed, thanks.
I don't see why we should support this. Geany is a text editor. Text files don't contain NULL bytes. If you want edit binary files, hex editors are more useful, regardless of what Notepad++ does.
They are, but sometimes I want just to see what's inside (given an unknown or broken file that I need to extract data from). Even poor old Windows notepad can handle binaries - why can't this pretty editor? More, some editors (Notepad++ or Midnight Commander's builtin) have a builtin Hex editor, which is sometimes useful. I'm using Geany
A hex editor is something completely different from a text editor. I also use mc's builtin hex editor which is pretty cool and I especially use it in case I got any files which contain NULL bytes (for whatever reason).
And as you said, make such files opening isn't enough at all, there are certainly many places in Geany which rely on the fact files are real text files and I don't think this is wrong at all. Geany is a text editor.
Sure. Even such simple things as changing file encoding/line endings will make a mess from your binary. But if we provide a very basic capability - that would be interesting. If we use this feature, there must be a warning like "You are opening a binary file in a text editor, this can lead to an unexpected result and we strongly recommend that you make a backup".
If a plugin crashes or hangs the whole program due to some unusual sequence of symbols - that's a problem of this plugin, I think. The other question is that the plugin will give unexpected results on unusual data - but that's what the end user should be warned and care
Not much doubt about that. But users still get annoyed and we will get the bug reports about the crashes...
I do not intend to make you use my patches (except the first one, if you can reproduce my behaviour)- just a proposal I find interesting.
Is that a costly feature or what speaks against it?
I just find it less useful. Besides Alexey's patch, there are probably certain other changes necessary to get this working properly, or at least good enough to put the remaining risks into the users' responsibility. For me, the first statement still counts: Geany is a text editor. Yes, this is a bit strict but still true.
At least, nobody would prohibit me to use the patch myself:)
Haha, yeah. That's one of the benefits of the GPL.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.asc
ATTACHMENT: application/pgp-signature _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Тесты новейших гаджетов на Hi-tech.Mail.Ru http://r.mail.ru/cln5823/hi-tech.mail.ru/