[OS X TeX] TeXShop encoding issue

Herbert Schulz herbs at wideopenwest.com
Fri Dec 8 21:16:39 CET 2017

> On Dec 8, 2017, at 2:10 PM, Rowland McDonnell <rowland.mcdonnell at physics.org> wrote:
>> Rowland,
>> If you open a file in TeXShop by double clicking or dragging to the
>> TeXShop icon, it will open using the default encoding, set in TeXShop
>> Preferences. I agree with others that you should use UTF-8 if you want
>> to preserve a range of non-ASCII characters.
>> If you open a file by using the TeXShop "Open" command, an "Open
>> Dialog" will appear. If you select "Options" then you can select the
>> encoding option you prefer for that one file.
>> One caveat: most encodings are just long streams of bytes, and if one
>> of these doesn't represent a character, you'll get a question mark.
>> But UTF-8 is an encoding with "rules" and if you try to open a random
>> stream of bytes, it will likely not follow the rules. Then the system
>> cannot open the file with UTF-8, and will warn you and then default to
>> something else.
>> Dick Koch
> Thank you to Stephen J Sangwine and Richard Koch: quite right, there are no curly quotes in Latin-9, which is a bit of a surprise.  For some reason, I'd assumed that Latin-9 - being the default encoding in TeXShop - was a good replacement for old fashioned Mac OS Roman encoding.  Perhaps it is for some uses, but seemingly not for mine.
> I've tried UTF-8 and all is well.
> Is there any good reason not to use UTF-8 by default for my LaTeX input files?
> Thanks to all,
> Rowland.


No real reason. If a file is NOT UTF-8 (ASCII is a sub-set of UTF-8 so it's OK) you'll get an error message while with 8-bit encodings all bytes are legal although they may represent different characters.

Take a look at the `File Encoding and TeXShop' document in TeXShop's Help Menu.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)

----------- Please Consult the Following Before Posting -----------
TeX FAQ: http://www.tex.ac.uk/faq
List Reminders and Etiquette: https://www.esm.psu.edu/~gray/tex/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
TeX on Mac OS X Website: http://mactex-wiki.tug.org/
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex

More information about the macostex-archives mailing list