Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 698
J86 Avatar asked Jan 22 '14 16:01

J86


People also ask

How do I add a BOM to UTF-8?

1. Add BOM to a UTF-8 file. To Add BOM to a UTF-8 file, we can directly write Unicode \ufeff or three bytes 0xEF , 0xBB , 0xBF at the beginning of the UTF-8 file. The Unicode \ufeff represents 0xEF , 0xBB , 0xBF , read this.

How do I save a UTF-8 file as BOM?

1 Answer. Select “Save As” from File menu, go to Save button and open its dropdown menu, select “Save with Encoding…”, choose “Unicode (UTF-8 without signature)”. Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How do I know if my BOM is UTF-8?

To check if BOM character exists, open the file in Notepad++ and look at the bottom right corner. If it says UTF-8-BOM then the file contains BOM character.


1 Answers

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

like image 160
cdesmetz Avatar answered Nov 04 '22 18:11

cdesmetz