Sublime Forum

Encoding problem. UTF-8 persists

#1

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]// 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",[/code]

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.

0 Likes

#2

Try using:

"fallback_encoding": "Western (ISO 8859-1)"
0 Likes

#3

Fantastic, that did the trick.
Thank you :smile:

0 Likes