Posted by Kelvin on 07 Nov 2013 at 09:35 am | Tagged as: Ubuntu
I've been tearing my hair out lately trying to open UTF-8 encoded text files in gedit (Ubuntu 12.04). For some reason, the auto charset detection mechanism is broken. Opening the same files using gvim or leafpad just works. Googling for a solution didn't help either.
Well, I found the fix. What you need to do is to declare the encodings using gsettings, and the order you'd like. Here's mine:
gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']"