I noticed this bug when I received a text file that Geany opened as something 
unreadable, but I found out that it is easily reproducible.

Let's say I create a file test.txt with some cyrillic content. For example, 
just one word "Тест", which is "Test" in Russian. Of course, it's two lines: 
the line with "Тест" and the last empty line. Then I select any Cyrillic 
encoding (e.g. Cyrillic/Russian (CP866)) and save the file. At this moment I 
still can discern its content: "Тест".

Then I close this file and open it again. Now it's content reads (in case I 
chose CP866) as "’¥áâ". Checking the encoding setting I see that it's now set 
to ISO-8859-1 (and no, I have not enabled the setting "Use fixed encoding when 
opening non-Unicode files"). Setting the encoding to the right one does not fix 
the issue because Geaby does not recode the content of the file, it just sets 
the encoding in which the current (wrong) content will be saved.

So it seems that Geany when it determines that the file is not Unicode tries to 
open it as ISO-8859-1. I don't know if it requires a lot of work to fix, but 
Notepad2 and Notepad++ on Windows, whichever the encoding is, determine it 
correctly. 

My system is:
Kernel: 4.10.1-1-MANJARO i686 (32 bit)
Geany 1.29
GTK 2.24.31, GLib 2.50.3

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1429

Reply via email to