Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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?

share|improve this answer
    
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

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']" 
share|improve this answer
    
This saved my day, another tip is the order of encoding is important to mark the priority. –  Smile.Hunter Jul 26 '13 at 12:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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