On 06.02.2010 17:37, Алексей Антипов 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).
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 as a primary text editor both on Windows and Linux, and I just wanted to make it more universal.
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 about.
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. At least, nobody would prohibit me to use the patch myself:)
I would love this. I find myself needing additional text editors (like scite) because geany is unable to view binary files. I think the mixed content example in the first email shows why geany should support it.
Is that a costly feature or what speaks against it?
Best regards.