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

1
  • 1
    As i experiences sublime ,it have some issue with showing UTF-8 ,but it save theme just fine.
    – user180445
    Apr 11, 2013 at 18:08

3 Answers 3

44

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

3
  • this will change file encoding.
    – interlude
    May 5, 2013 at 20:46
  • 5
    @interlude water is wet
    – aug
    Jun 8, 2016 at 22:26
  • 4
    @aug I have no idea why I wrote that comment 3 years ago.
    – interlude
    Jun 11, 2016 at 12:22
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.

2
  • 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 Aug 1, 2013 at 13:37
  • 1
    Looks like it's "UTF-8 with BOM" for with BOM.
    – ruffin
    Nov 5, 2014 at 14:34
3

This is the correct configuration:

{
    "Default_encoding": "UTF-8",
    "font_size": 9,
    "ignored_packages":
    [
        "Vintage"
    ]
}
1
  • 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, 2014 at 19:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .