Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove BOM in Intellij Idea

I'd like to remove Bite Order Masks from my
UTF-8 files in Intellij IDEA, how can I do this?

The problem is that if I'm trying to do it via other editors (e.g. Akelpad),
when I modify the file later in IDEA it somehow remembers that BOM
was present and adds it to my file again (((

like image 945
tsds Avatar asked Oct 24 '11 07:10

tsds


People also ask

How do I get rid of BOM?

How to remove BOM. If you want to remove the byte order mark from a source code, you need a text editor that offers the option of saving the mark. You read the file with the BOM into the software, then save it again without the BOM and thereby convert the coding. The mark should then no longer appear.

What is BOM in PyCharm?

If the byte order mark (BOM) is present, PyCharm will use the corresponding Unicode encoding regardless of all other settings. For more information, see Byte order mark. If the file declares the encoding explicitly, PyCharm will use the specified encoding. For example, this can apply to XML or HTML files.

How do I turn off local changes in IntelliJ?

You can always undo the changes you've made locally before you commit them: In the Commit tool window Alt+0 , select one or more files that you want to revert, and select Rollback from the context menu, or press Ctrl+Alt+Z .


1 Answers

Tested on PHPStorm 8:

Right click on a file in the project tree, click on "Remove BOM"

(Not sure if it exists on the base platform, comments will be helpful)

like image 190
SuperDuck Avatar answered Dec 04 '22 22:12

SuperDuck