100

When I open a file in Sublime Text 3, at the bottom I have an option to set the Character Encoding as shown in the screenshot.

setting encoding

There is the option to set it to UTF-8 , which after doing some research means UTF-8 Without BOM, but I want to set it to UTF-8 With BOM like shown below:

UTF-8 with BOM

How can I do this from within ST3?

dreftymac
  • 29,742
  • 25
  • 114
  • 177
J86
  • 13,151
  • 40
  • 123
  • 206

4 Answers4

172

Into Preferences > Settings - Users
File : Preferences.sublime-settings

Write this :

"show_encoding" : true,

It's explain on the release note date 17 December 2013. Build 3059. Official site Sublime Text 3

Mahdi
  • 8,891
  • 9
  • 51
  • 72
cdesmetz
  • 2,192
  • 2
  • 13
  • 7
  • 9
    in all fairness, before i downvote this was it correct at some point? In the current release `show_encoding` does not offer a "with BOM" option and therefore does not answer the question. – Eaten by a Grue Sep 13 '16 at 17:07
  • 1
    Did I misunderstanding here? This doesn't answer the question at all..... – Jimmy liu Jan 10 '17 at 06:49
  • It doesn't answer the question, but I have to admit that it helped me figure out a problem I was having with my code being interpreted as Chinese characters – Mr Bell Oct 07 '17 at 23:14
  • does not answer the question and does not work in ST3 – ninja Oct 13 '17 at 08:12
104

I can't set "UTF-8 with BOM" in the corner button either, but I can change it from the menu bar.

"File"->"Save with encoding"->"UTF-8 with BOM"

Jimmy liu
  • 1,517
  • 1
  • 12
  • 13
3

Into the Preferences > Setting - Default

You will have the next by default:

// Display file encoding in the status bar
    "show_encoding": false

You could change it or like cdesmetz said set your user settings.

harryssuperman
  • 395
  • 2
  • 6
0

By default, Sublime Text set 'UTF8 without BOM', but that wasn't specified.

The only specicified things is 'UTF8 with BOM'.

Hope this help :)

Azee
  • 71
  • 12