[OS X TeX] Leopard Quick Look & TeX

Herbert Schulz herbs at wideopenwest.com
Fri Nov 30 17:18:02 EST 2007


On Nov 30, 2007, at 4:14 PM, Mark Eli Kalderon wrote:

>>
>> 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


Howdy,

Magic! Thanks for the information.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)





More information about the MacOSX-TeX mailing list