Comment 5 for bug 67844

Revision history for this message
Peter Surňák (okolnost) wrote :

I just want to add that I just had similar problem.
I opened cp1250 encoding text file. Gedit opened it incorrectly as iso-8859-2 file thus making it hardly readable.
I tried the same file in Leafpad - worked fine (probably has some type of guessing algorithm).
I tried it in Geany - opened wrong, similar to gedit, but there is an option to "reopen file with encoding..."
So I reopened it in Geany as cp1250 encoding, changed to utf8 and saved.

After that, Gedit informed me that file changed on filesystem and after reload - it was even much worse. Gedit apparently reloaded without checking encoding again.
I closed Gedit and opened the file again in Gedit. Everything was fine, it correctly recognized utf8.

So in conclusion:
1) Gedit is unable to recognize cp1250 encoding (at least, did not try any other) - which is probably intentional lack of feature. Fine, maybe in future?
2) Gedit lacks an easy way to reload file with user chosen encoding - which is a pitty, I think. I even thought I cannot choose encoding at all in Gedit until I read first comments in this thread. (I usually open files directly from nautilus.)
3) Gedit, when reloading file after io filesystem change, does not check for change in encoding. This is, I think, the worst of these three. Gedit knows that something has happened with the file, so there is no reason to suppose that it should not have been change in encoding, is it? Therefore encoding should be checked as well, when reloading already opened file.

That is all I found about that, hope it helps somehow.

I also attached that file, just in case...