New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geany does not open files with the default encoding. #900
Comments
I presume you checked "Use fixed encoding when opening non-unicode files"? |
Yes, is checked. |
If you have selected both the "default encoding" combo boxes in Prefs->Files page, what if you select an explicit encoding in the Open File dialog (options at the bottom)? If this doesn't work or shows an error I think there's a bug in the file's encoding or else in GLib converter. |
Hi. |
I don't know if it's the same bug but I save the joined file with IBM850 encoding and each time I open it, the encoding is ISO-8859-1 and some characters are wrong like ê that becomes �. Geany version 1.38 under Linux Mint Cinnamon 22.1. |
You need to set the encoding manually, with only a couple of non-ASCII characters its impossible to automatically detect the encoding accurately, several encodings are possibly valid, so when several encodings are valid the choice is arbitary. On the open dialog |
I did it: menu Document - Define encoding - West european - IBM 850 but ê that became � remain � on screen, it doesn't become ê. |
No, on the Open dialog, not Documents menu. Geany manipulates all documents as UTF-8 internally, encodings only have any effect on loading or saving the document. The |
OK, I found it, it was hidden by default. Thank you. |
The problem is when I open the file with double-clicking on it. It is automatically opened by Geany with the wrong encoding. |
A solution could be having the possibility to choose both encoding on screen and when saving, separately. |
There is no "encoding on screen", the file is converted to UTF-8 when its loaded, it is then closed, no non-UTF-8 artefact remains. The encoding in memory is always going to be UTF-8, Geany is an IDE, its use-case is editing code (all coding languages are covered by UTF-8) and documentation (and all human languages are covered by UTF-8). Having different encodings in memory makes all the operations of the IDE difficult, and pretty much impractical. The only thing that may have non-UTF-8 encoding is the file on disk, and the only time that is relevant is reading and writing the buffer in memory, so thats when encoding happens. You can reload the file with a different encoding Unfortunately there is no solution to the double click problem, there is no command line option to set encoding, and even if "somebody" added one (pull requests are welcome) that just likely means every file is going to be opened with the encoding you teach Nemo to use by setting the option on the command it uses for txt files. |
Thank you for your explanations. File->Reload As->... is a good solution for me, I didn't know that. |
Fundamental operation, won't change. Both OP and recommentor have workarounds. |
Hi.
OS: Windows 7 64bits
Geany version: 1.26
In "Edit>Preferences>Files>Encodings" I selected IBM850 as default encoding in all options, new files and open files, but all files are opened with 1252 encoding. With new files there is no problem.
Thank you.
The text was updated successfully, but these errors were encountered: