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:

span class="st0">"['UTF-8', 'CURRENT', 'ISO-8859-15', 'UTF-16']"