[TextMate] Re: Problem with UTF8 encoding

Allan Odgaard allan at macromates.com
Wed Oct 13 11:07:02 UTC 2004


On 13. Oct 2004, at 12:50, Dominique PERETTI wrote:

> - If you reopen in TextMate, it stills appear as UTF8... BUT if you 
> reopen it in BBEdit, it opens as a MacRoman file (with accents wrong).

I don't have BBEdit, but I think BBEdit _always_ opens as MacRoman. And 
you have to manually tell it to open it with the proper encoding (at 
least that was my experience when I tried it >2 years ago, both my 
iso-8859-1 and utf-8 files were all opened as MacRoman by BBEdit)!?!

> My guess is that TextMate is right at encoding the characters, but 
> forgots to write the BOM right. I think so because I get the same 
> wrong results in FlashMX
> if I save the file as utf8-(no BOM) from BBEdit.

The BOM is optional in utf-8, and generally you _don't_ want it, since
   a) it makes no sense as there is no byte-order ambiguity,
   b) it rules the nice property of utf-8 being compatible with ascii,
   c) utf-8 encoding is really easy to recognize even without a BOM.

But if several programs only treat utf-8 properly when it has a BOM, I 
will consider adding an option -- though I would recommend against 
using it of course! ;)



Kind regards Allan




More information about the textmate mailing list