Replies: 4 comments 7 replies
-
No, Geany cannot open files with a NUL byte in them, it is written in C where NUL means end of string. Notepad++ is written in C++ which can handle strings with NUL in them. Also Geany assumes that the buffer contents are UTF-8, so as a file is opened its encoding is converted to UTF-8. So if it can't find an encoding that works it won't open the file. |
Beta Was this translation helpful? Give feedback.
-
Oh geez, that is quite limiting, I wasn't expecting this. Any plan on rewriting Geany with C++ in 2024? |
Beta Was this translation helpful? Give feedback.
-
Rewriting as C++ would only help a little, so it proabaly could read NULs, but it is still required to be (convertible to) UTF-8. Just a query, why is it so limiting? What languages have embedded NULs? Geany is a lightweight IDE which edits text files, and can build applications from them, thats its use-case, and then Unicode covers all text. Its use-case does not include examining and patching binary files. If you have a use-case for reading/modifying binary it would be better to use the right tool, one that is designed to handle unformatted binary. |
Beta Was this translation helpful? Give feedback.
-
I'm not specifically talking about editing a source file that contains a NUL character. I'm talking about not being able to quickly peek at just any file (opening as read-only would have been enough for me). Geany refuses to open files that it does not recognize and this is what I call limiting. NotePad++ under Windows opened ANYTHING and never complained about not being able to recognize the file format or the language. It would display anything as plain text, even binary files. I'm well aware of other utilities for this kind of job such as hex editors (which I also have) but I like to be able to quickly peek at files without switching apps when I'm working in an IDE. Kate under macOS looks to be a closer replacement to NotePad++ as it not only lets you open any (binary or whatever) file you want, but it also has a "Find in files" function, which I could not find in Geany unfortunately. Thanks again for trying to help and good luck with Geany. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to force Geany to open ANY file it doesn't recognize as plain text or ASCII? I don't care for syntax on some of the files, I just want to see the raw contents. NotePad++ didn't have any issue in opening whatever and displaying it (even binary files) so can Geany do that?
Beta Was this translation helpful? Give feedback.
All reactions