The title says pretty much most of it - I have some windows txt files, and most of them are Bulgarian with encoding windows-1251. When I open them (sublime, gedit, desktop generated icons) the files are with windows-1252 (western Europe) I can manually select the file encoding, but it get pretty much tiresome after some time.

So, how to set default encoding for non UTF encoded documents?


Just set the encoding in a terminal by entering this line:

gsettings set org.gnome.gedit.preferences.encodings auto-detected "['UTF-8', 'WINDOWS-1251', 'CURRENT', 'ISO-8859-15', 'UTF-16']" 
  • This saved my day, another tip is the order of encoding is important to mark the priority. Jul 26 '13 at 12:26

One technique is to create a script that invokes gedit with the --encoding option, as in Superuser question Gedit - how to set default encoding opening?

  • This will solve my issue with gedit, but not with the other 15 programs. BTW, Kate works as expected out of the box :)
    – deckoff
    Mar 6 '12 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.