44

How do I change the file encoding in Sublime Text 2?

How do I change character encoding of a text file in OpenOffice.org writer?

http://www.sublimetext.com/forum/viewtopic.php?f=4&t=3541

user216268
  • 541
  • 1
  • 4
  • 3
  • 1
    As i experiences sublime ,it have some issue with showing UTF-8 ,but it save theme just fine. –  Apr 11 '13 at 18:08

3 Answers3

44

Just go to File → "Save with encoding" and select your preferred encoding.

Indrek
  • 24,204
  • 14
  • 90
  • 93
BlaShadow
  • 625
  • 1
  • 6
  • 9
24

If you want to set UTF-8 as your default encoding, you can also do this:

Preferences -> Settings - User -> Add this line of code

"default_encoding": "UTF-8",

Save.

Conor
  • 341
  • 1
  • 3
  • 3
    Just to make sure... "UTF-8" means "UTF-8 without BOM" right? I assume it would be "UTF-8 BOM" or something like that otherwise – dominicbri7 Aug 01 '13 at 13:37
  • 1
    [Looks like](http://www.sublimetext.com/forum/viewtopic.php?f=3&t=3951#p18302) it's `"UTF-8 with BOM"` for with BOM. – ruffin Nov 05 '14 at 14:34
3

This is the correct configuration:

{
    "Default_encoding": "UTF-8",
    "font_size": 9,
    "ignored_packages":
    [
        "Vintage"
    ]
}
Mokubai
  • 89,133
  • 25
  • 207
  • 233
  • Please note that this is an English speaking site so your answers should be in English. You also do not need to put a signature in your answer as your name automatically appears below the answer. Welcome to Superuser. – Mokubai Apr 16 '14 at 19:09