[OS X TeX] Leopard Quick Look & TeX

Mark Eli Kalderon eli at markelikalderon.com
Fri Nov 30 17:14:06 EST 2007

On Nov 30 2007, at 21:26, Herbert Schulz wrote:

> On Nov 30, 2007, at 3:16 PM, Mark Eli Kalderon wrote:
>> BBEdit can set and remove BOM. BUT it is unnecessary and  
>> undesirable to do so. It is unnecessary since UTF-8 can be  
>> recognized without it. It is undesirable since many *nix utilities  
>> choke on it.
>> Best, Mark
> Howdy,
> How does it tell? I know it works just fine.
> Good Luck,
> Herb Schulz

Don't know how it works with BBEdit, but this is what Allan Oddgard  
developer of TextMate has to say <http://blog.macromates.com/2005/handling-encodings-utf-8/ 

> Generating a random 15 byte sequence containing characters in the  
> range 0×17—0xFF has a probability of 0.000081 to be valid UTF-8 (the  
> probability gets lower, the longer the sequence is, and is also  
> lower for actual text).
> [this] turns out to be attractive because it means we can  
> heuristically recognize UTF-8 with a near 100% certainty by checking  
> if the file is valid. Some software think it’s a good idea to embed  
> a BOM (byte order mark) in the beginning of an UTF-8 file, but it is  
> not, because the file can already be recognized, and placing a BOM  
> in the beginning of a file means placing three bytes in the  
> beginning of the file which a program that use the file may not  
> expect (e.g. the shell interpreter looks for #! as the first two  
> bytes of an executable).
Best, Mark

More information about the MacOSX-TeX mailing list