[TxMt] UTF-8 BOM problem

Hans-Joerg Bibiko bibiko at eva.mpg.de
Thu Sep 28 10:32:01 UTC 2006


Dear list menbers,

I have the following problem:

I received a plain text file utf-8 encoded written on a Windows PC. I  
could open this file and I could edit this file perfectly.
After my modifications I saved this as utf-8 with LF. OK.

Then I tried to import the content of that file in a database. This  
didn't work, because the database couldn't parse the first line.
Then I opened that file in a HexEditor and I saw that the first line  
begins with EF BB BF. After looking at this I remembered that these  
bytes are the BOM (Byte Order Marker) for utf-8 and Windows PC's make  
often use of it to save utf-8 text files.

My problem is now that I couldn't find a way to save my text file as  
utf-8 without BOM.

I had to use jEdit for that, because in jEdit you can select the  
encoding utf-8 or utf-8y (meaning with BOM).


Is there any chance to implement this in TextMate? Or, may be better,  
that TextMate saves all utf-8 files without BOM, because I think this  
marker is irrelevant within utf-8. It only makes sense in utf-16/32.


All the best,

Hans






More information about the textmate mailing list