[OS X TeX] encoding and special characters in TexShop

Peter Dyballa Peter_Dyballa at Web.DE
Sun Sep 17 06:57:36 EDT 2006


Am 17.09.2006 um 09:36 schrieb Alex Hamann:

> ! Package inputenc Error: Keyboard character used is undefined
> (inputenc)                in inputencoding `latin1'.
>
> why is this so? I thought latin1 and applemac were interchangable  
> on a mac.

Because you need to convert the Mac-Roman encoded file's whole  
contents to ISO Latin-1, i.e. ISO 8859-1.

In Mac-Roman the German umlauts are at:

;   oct   dec   hex    UCS2    UTF-8
;=====================================
ä = 212 = 138 = 8A = U+00E4 =  C3 A4 : LATIN SMALL LETTER A WITH  
DIAERESIS
Ä = 200 = 128 = 80 = U+00C4 =  C3 84 : LATIN CAPITAL LETTER A WITH  
DIAERESIS
ö = 232 = 154 = 9A = U+00F6 =  C3 B6 : LATIN SMALL LETTER O WITH  
DIAERESIS
Ö = 205 = 133 = 85 = U+00D6 =  C3 96 : LATIN CAPITAL LETTER O WITH  
DIAERESIS
ü = 237 = 159 = 9F = U+00FC =  C3 BC : LATIN SMALL LETTER U WITH  
DIAERESIS
Ü = 206 = 134 = 86 = U+00DC =  C3 9C : LATIN CAPITAL LETTER U WITH  
DIAERESIS

If the oct/dec/hex codes in the file get interpreted as ISO 8859-1  
character codes, they mutate to:

8 bit control char
8 bit control char
8 bit control char
8 bit control char
8 bit control char
8 bit control char

or, in other words: (6) illegal characters. (ß [247 = 167 = A7]  
becomes §.)


\usepackage[<some encoding>]{inputenc} does not choose one encoding  
out of a few, like in the case of fontencoding. It tells TeX how to  
interpret the 8 bit codes in the file (because there are more than 50  
ways to do it wrong), or how to classify them. So the inputenc  
statement has to exactly match the contents, because you shouldn't  
claim it's Chinese when it's just German.

--
Greetings

   Pete

A common mistake that people make when trying to design something  
completely foolproof is to underestimate the ingenuity of complete  
fools.


------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list