Can't stop RubyMine from creating BOMs

Hallo,

I use 135.1104 . All my Source-Files are in UTF-8. When I open them and save them a UTF-8 BOM is added in front. I can't find a way to turn that off. "File|File Encodings" is grayed out. "Settings|IDE Settings|General|IDE Enconding" is set to UTF-8.

Please help, if i can't stop this RubyMine is unusable for us. The entire existing Workflow is choking on this BOM and we are getting tired getting out a Hex Editor to clean the files.

--mr

3 comments
Comment actions Permalink

Hi,

what particular file RubyMine saves with BOM?  I've checked Gemfile and .rb file and it looks like everything is ok :(
Also I can check file's encoding (see right part of status bar).

Regards, Oleg.

0
Comment actions Permalink

I do check out the files from SVN, check them for a BOM (there isn't any), start RubyMine, edit them, save them, close RubyMine, check for a BOM ... and surprise, there is one :/

But, actually, to my surprise, it doesn't happen 100% of the time. I tried to force this to create a Testcase and had mixed results. All our Files start out with "# -*- coding: utf-8 -*-", some include a "#!/usr/bin/env ruby", which made no difference.If the File is smaller than 1K, there is no BOM (at least i was not able to produce it). Using greek letters like "αβΩ" created no BOM, mixing some russian in, no BOM, using german or chinese, bingo BOM. And once a file was once seen with BOM i found no way to reset that behaviour of adding it even when i switched contents to a all-ASCII charset. But copying the file to a new unseen name in the project, removing the BOM in a Hex-Editor and then open/save it in RubyMine seem to work to keep the BOM away. Until you put some UTF-8-Glyphs in and the game starts anew.

There should be some options "Never ever use BOM on UTF-8" and "Remove BOM on UTF-8". I still have to see a single use case that needs a BOM on UTF-8.

--mr

0
Comment actions Permalink

Could you please attach the file w/o BOM which will be saved with BOM, so I could play with it?

Regards, Oleg.

0

Please sign in to leave a comment.