Set Encoding of File to UTF8 With BOM in Sublime Text 3

EncodingUtf 8Sublimetext3Sublimetext2Byte Order-Mark

Encoding Problem Overview


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?

Encoding Solutions


Solution 1 - Encoding

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

Solution 2 - Encoding

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"

Solution 3 - Encoding

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.

Solution 4 - Encoding

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

The only specicified things is 'UTF8 with BOM'.

Hope this help :)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJ86View Question on Stackoverflow
Solution 1 - EncodingcdesmetzView Answer on Stackoverflow
Solution 2 - EncodingJimmy liuView Answer on Stackoverflow
Solution 3 - EncodingharryssupermanView Answer on Stackoverflow
Solution 4 - EncodingAzeeView Answer on Stackoverflow