Home Download Buy Blog Forum Support

Encoding problem. UTF-8 persists.

Encoding problem. UTF-8 persists.

Postby Morten on Fri Dec 14, 2012 7:25 am

Hi,
I am working with ISO-8859-1 files, but Sublime Text 2 seems to override this encoding when I re-open them. This causes huge problems as all the special characters (æøåÆØÅ) gets corrupted.

I've tried changing the default and fallback encoding in the settings-default file, but it still opens up old and new files in UTF-8.

Here is what is in the default-settings file:
Code: Select all
// The encoding to use when the encoding can't be determined automatically.
    // ASCII, UTF-8 and UTF-16 encodings will be automatically detected.
    "fallback_encoding": "ISO-8859-1",

    // Encoding used when saving new files, and files opened with an undefined
    // encoding (e.g., plain ascii files). If a file is opened with a specific
    // encoding (either detected or given explicitly), this setting will be
    // ignored, and the file will be saved with the encoding it was opened
    // with.
    "default_encoding": "ISO-8859-1",


Is there any way I can get Sublime to open my files with ISO-8859-1 encoding as standard? It's quite a hassle to have to open up files, then reopen with correct encoding everytime I open a file.
I work mainly with .jsp and .css files.
Morten
 
Posts: 2
Joined: Fri Dec 14, 2012 7:10 am

Re: Encoding problem. UTF-8 persists.

Postby bizoo on Fri Dec 14, 2012 7:48 am

Try using:
Code: Select all
"fallback_encoding": "Western (ISO 8859-1)"
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Encoding problem. UTF-8 persists.

Postby Morten on Fri Dec 14, 2012 8:06 am

Fantastic, that did the trick.
Thank you :)
Morten
 
Posts: 2
Joined: Fri Dec 14, 2012 7:10 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Renegade221, Yahoo [Bot] and 29 guests