[TxMt] FYI: MarsEdit Supports TextMate

Allan Odgaard allan at macromates.com
Mon Nov 8 01:35:29 UTC 2004


On 8. Nov 2004, at 2:06, Chris Messina wrote:

>> There appears to be a TextMate bug regarding character encoding. I 
>> use the exact same code for TextMate as for BBEdit and SubEthaEdit -- 
>> but TextMate turns curly quotes (and so on) into weird characters. 
>> [...]

And what encoding would that be? My guess is that it's MacRoman, which 
several programs defaults to, but TextMate doesn't, here's what it 
does:

  1) check if text is ASCII, no encoding
  2) check if text has BOM, use UTF-8, UTF-16 LE/BE based on BOM
  3) check if text is valid UTF-8, use UTF-8 if so
  4) use frequency counts to decide between CP-1252, MacRoman, and 
iso-8859-1.

So I'd suggest that MarsEdit use UTF-8 and place a BOM in the beginning 
of the text. This should also work with BBEdit and SubEthaEdit.

Or alternatively, let me know how I can “get” the encoding that 
MarsEdit uses ;)

I could update my frequencies to improve #4, but today everything 
really ought to be in UTF-8, even w/o the BOM this is easily detectable 
unlike the other 8 bit encodings!

I've cc'ed this letter to info at ranchero.com




More information about the textmate mailing list