[OS X TeX] Using Latin-1 with TexShop preferences set at UTF-8
Benoit RIVET
benoit.rivet at free.fr
Fri Aug 24 18:25:19 CEST 2012
Le 24 août 2012 à 17:26, Jacques ANDRÉ a écrit :
> I have a new iMac under Mountain Lion. I have installed MacTeX2012
> (including the bug corrections).
>
> I have set TeXShop preferences so that encoding= ISO Latin 1 (most of my sources are still in latin-1!).
> It works fine, both with Latin-1 texts, and with UTF-8 texts when I open them with encoding=Unicode (UTF-8).
>
> Now, I reset TeXShop preferencies to Encoding=Unicode (UTF-8) (and restart the mac).
> If I open UTF-8 texts, it's OK.
> If I open Latin-1 texts with Encoding=Occidental (ISO Latin 1), the TeXShop window show my latin-1 text as if it was an UTF-8 text seen by a Latin-1 editor.
> However, TeXShop runs correctly my source and the output is OK.
Opening the file with another editor (and checking it's been opened with the proper encoding), you can add the following line at the beginning of your file :
%!TEX encoding = IsoLatin
so that TexShop recognizes it's encoded with the Latin1 encoding. I usually add this line with TextWrangler (which is available for free on the Mac Appstore)…
For other encodings, use :
%!TEX encoding = MacOSRoman
or :
%!TEX encoding = UTF-8 Unicode
depending on whether you use MacOS or utf8 encoding. This way, you'll be able to open your file with the proper encoding, whatever TexShop preferences you have set.
Benoît RIVET
More information about the macostex-archives
mailing list