[OS X TeX] Re: Latexian 1.0 Released
Claus Gerhardt
claus.gerhardt at uni-heidelberg.de
Thu Dec 9 14:19:32 EST 2010
Exchanging files between different platforms could be a problem, though I doubt that TeXShop's encoding methods would be recognized by a Windows machine. However, for OS 10.5.x or better the encoding can be specified in the extended attributes of a file, cf.
• TextEdit now stores encoding of plain text files with the file, as an extended attribute. (Please refer to the Foundation release notes for technical details on this.) The stored encoding enables the files to be interpreted correctly upon reading. With this change, the default encoding for saving in TextEdit has also been changed to UTF-8. This can of course be overridden through the preference panel, or on a per-file basis in the save panel.
Claus
On Dec 9, 2010, at 19:33, Jonathan Kew wrote:
> On 9 Dec 2010, at 18:06, Claus Gerhardt wrote:
>
>> BBEdit and TextEdit (the newer versions) can detect the encoding of a plain text file when opening it and they are using the corresponding encoding when saving the file. In TextEdit's preferences the default encoding should be set to automatic.
>
> They can not *reliably* detect the encoding of a plain text file; they use various heuristics to make a *guess*. Depending on the contents of the text, this guess may be almost certain, or it may be little more than a reasonable possibility.
>
> Trivial example: using BBEdit, create a file "encoding-test.txt" that contains the text
>
> What character do you think "Æsop" starts with?
>
> and save it as Window Latin-1. (Imagine a colleague on Windows sent you this as a plain text file.) Then use TextEdit to open that file in "automatic" mode. At least on my Mac (running 10.6.5), it guesses wrong, and the Æ appears as ∆ instead.
>
> Using some form of metadata -- such as the %!TEX encoding = .... line -- to explicitly declare the encoding of the file is much safer than relying on software guesswork. I don't want to rely on some program's guesses to determine the characters that get printed in my documents.
>
> JK
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
More information about the MacOSX-TeX
mailing list