% \iffalse meta-comment % % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % % This file is part of the LaTeX base system. % ------------------------------------------- % % It may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3c or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This file has the LPPL maintenance status "maintained". % % The list of all files belonging to the LaTeX base distribution is % given in the file `manifest.txt'. See also `legal.txt' for additional % information. % % The list of derived (unpacked) files belonging to the distribution % and covered by LPPL is defined by the unpacking scripts (with % extension .ins) which are part of the distribution. % % \fi % % \iffalse %<*driver> \documentclass{ltxdoc} \GetFileInfo{utf8.def} \title{Providing some UTF-8 support via \texttt{inputenc}} \date{\fileversion\space\filedate{} printed \today} \author{% Frank Mittelbach \and Chris Rowley\thanks{Borrowing heavily from code by David Carlisle and tables by Sebastian Rahtz; some table and code cleanup by Javier Bezos}} \begin{document} \maketitle \tableofcontents \DocInput{utf8ienc.dtx} \end{document} % % \fi % % \CheckSum{1090} % % \newpage % % \section{Introduction} % % [The whole section is rather unfinished \ldots\ just like the code, sorry!] % % \subsection{Background and general stuff} % % For many reasons what this package provides is a long way from any % type of `Unicode compliance'. % % In stark contrast to 8-bit character sets, with 16 or more bits it can % easily be very inefficient to support the full range.\footnote{In % fact, \LaTeX's current 8-bit support does not go so far as to make % all 8-bit characters into valid input.} Moreover, useful support of % character input by a typesetting system overwhelmingly means finding % an acceptable visual representation of a sequence of characters and % this, for \LaTeX{}, means having available a suitably encoded 8-bit % font. % % Unfortunately it is not possible to predict exactly what valid UTF-8 % octet sequences will appear in a particular file so it is best to % make all the unsupported but valid sequences produce a reasonably % clear and noticeable error message. % % There are two directions from which to approach the question of what % to load. One is to specify the ranges of Unicode characters that will % result in some sensible typesetting; this requires the provider to % ensure that suitable fonts are loaded and that these input characters % generate the correct typesetting via the encodings of those fonts. The % other is to inspect the font encodings to be used and use these to % define which input Unicode characters should be supported. % % For Western European languages, at least, going in either direction % leads to many straightforward decisions and a few that are more % subjective. In both cases some of the specifications are \TeX{} % specific whilst most are independent of the particular typesetting % software in use. % % As we have argued elsewhere, \LaTeX{} needs to refer to characters via % `seven-bit-text' names and, so far, these have been chosen by % reference to historical sources such as Plain \TeX{} or Adobe encoding % descriptions. It is unclear whether this ad hoc naming structure should % simply be extended or whether it would be useful to % supplement it with standardised internal Unicode character names such as % one or more of the following:\footnote{Burkhard und Holger Mittelbach % spielen mit mir! Sie haben etwas hier geschrieben.} % % \begin{verbatim} % \ltxutwochar <4 hex digits> % % \ltxuchar {} % B H U R R R % % \ltxueightchartwo <2 utf8 octets as 8-bit char tokens> % \ltxueightcharthree <3 utf8 octets ...> % \ltxueightcharfour <4 utf8 octets ...> % \end{verbatim} % % % \subsection{More specific stuff} % % In addition to setting up the mechanism for reading UTF-8 characters % and specifying the \LaTeX-level support available, this package % contains support for some default historically expected \TeX-related % characters and some example `Unicode definition files' for standard % font encodings. % % % \subsection{Notes} % % This package does not support Unicode combining characters as \TeX{} % is not really equipped to make this possible. % % No attempt is made to be useful beyond Latin, and maybe Cyrillic, % for European languages (as of now). % % % \subsection{Basic operation of the code} % % The \texttt{inputenc} package makes the upper 8-bit characters active and % assigns to all of them an error message. It then waits for the % input encoding files to change this set-up. Similarly, whenever % |\inputencoding| is encountered in a document, first the upper % 8-bit characters are set back to produce an error and then the % definitions for the new input encoding are loaded, changing some of the % previous settings. % % The 8-bit input encodings currently supported by \texttt{inputenc} % all use declarations such as |\DeclareInputText| and the like to map an % 8-bit number to some \LaTeX{} internal form, e.g.~to |\"a|. % % The situation when supporting UTF-8 as the input encoding is % different, however. Here we only have to set up the actions of % those 8-bit numbers that can be the first octet in a UTF-8 % representation of a Unicode character. But we cannot simply set % this to some internal \LaTeX{} form since the Unicode character % consists of more than one octet; instead we have to define this % starting octet to parse the right number of further octets that % together form the UTF-8 representation of some Unicode character. % % Therefore when switching to \texttt{utf8} within the % \texttt{inputenc} framework the characters with numbers (hex) % from \texttt{"C2} to \texttt{"DF} are defined to parse for a % second octet following, the characters from \texttt{"E0} to % \texttt{"EF} are defined to parse for two more octets and finally % the characters from \texttt{"F0} to \texttt{"F3} are defined to % parse for three additional octets. These additional octets are % always in the range \texttt{"80} to \texttt{"B9}. % % Thus, when such a character is encountered in the document (so % long as expansion is not prohibited) a defined number of % additional octets (8-bit characters) are read and from them a % unique control sequence name is immediately constructed. % % This control sequence is either defined (good) or undefined % (likely); in the latter case the user gets an error message % saying that this UTF-8 sequence (or, better, Unicode character) % is not supported. % % If the control sequence is set up to do something useful then it will % expand to a \LaTeX{} internal form: e.g.~for the utf8 sequence of % two octets \texttt{"C3 "A4} we get |\"a| as the % internal form which then, depending on the font encoding, % eventually resolves to the single glyph `latin-a-umlaut' or to % the composite glyph `latin-a with an umlaut accent'. % % These mappings from (UTF-8 encoded) Unicode characters to \LaTeX{} % internal forms are made indirectly. The code below provides a % declaration |\DeclareUnicodeCharacter| which maps Unicode numbers % (as hexadecimal) to \LaTeX{} internal forms. % % This mapping needs to be set up only once so here it is done at % |\begin{document}| by looking at the list of font encodings that % are loaded by the document and providing mappings related to % those font encodings whenever these are available. Thus at most % only those Unicode characters that can be represented by the glyphs % available in these encodings will be defined. % % Technically this is done by loading one file per encoding, % if available, that is supposed to provide the necessary mapping % information. % % % \StopEventually{} % % % % % \section{Coding} % % \subsection{Housekeeping} % % The usual introductory bits and pieces: % % \begin{macrocode} %\ProvidesFile{utf8.def} %\ProvidesFile{utf8-test.tex} %<+lcy> \ProvidesFile{lcyenc.dfu} %<+ly1> \ProvidesFile{ly1enc.dfu} %<+oms> \ProvidesFile{omsenc.dfu} %<+ot1> \ProvidesFile{ot1enc.dfu} %<+ot2> \ProvidesFile{ot2enc.dfu} %<+t1> \ProvidesFile{t1enc.dfu} %<+t2a> \ProvidesFile{t2aenc.dfu} %<+t2b> \ProvidesFile{t2benc.dfu} %<+t2c> \ProvidesFile{t2cenc.dfu} %<+ts1> \ProvidesFile{ts1enc.dfu} %<+x2> \ProvidesFile{x2enc.dfu} %<+all> \ProvidesFile{utf8enc.dfu} [2006/03/30 v1.1i UTF-8 support for inputenc] % \end{macrocode} % % \begin{macrocode} %<*utf8> \makeatletter % \end{macrocode} % We restore the |\catcode| of space (which is set to ignore in % \texttt{inputenc}) while reading \texttt{.def} files. Otherwise % we would need to explicitly use |\space| all over the place in % error and log messages. % \changes{v1.1d}{2004/05/08}{Explicitly set catcode of space} % \begin{macrocode} \catcode`\ \saved@space@catcode % \end{macrocode} % % % % \subsection{Parsing UTF-8 input} % % \begin{macro}{\UTFviii@two@octets} % \begin{macro}{\UTFviii@three@octets} % \begin{macro}{\UTFviii@four@octets} % A UTF-8 char (that is not actually a 7-bit char, i.e.~a single % octet) is parsed as follows: each starting octet is an active % \TeX{} character token; each of these is defined below to be a % macro with one to three arguments nominally (depending on the % starting octet). It calls one of |\UTFviii@two@octets|, % |\UTFviii@three@octets|, or |\UTFviii@four@octets| which then % actually picks up the argument(s). % % From the arguments a control sequence with a name of the form % \verb=u8:#1#2...= is constructed where the |#i| ($i>1$) are the % arguments and |#1| is the starting octet (as a \TeX{} character % token). Since some or even all of these characters are active % (when inputenc is loaded) we need to use |\string| when building % the csname. % % The csname thus constructed can of course be undefined but to % avoid producing an unhelpful low-level undefined command error we % pass it to |\UTFviii@defined| which is responsible for producing % a more sensible error message (not yet done!!). If, however, it is % defined we simply execute the thing (which should then expand to % an encoding specific internal \LaTeX{} form). % \begin{macrocode} \def\UTFviii@two@octets#1#2{\expandafter \UTFviii@defined\csname u8:#1\string#2\endcsname} % \end{macrocode} % \end{macro} % % \begin{macrocode} \def\UTFviii@three@octets#1#2#3{\expandafter \UTFviii@defined\csname u8:#1\string#2\string#3\endcsname} % \end{macrocode} % \end{macro} % % \begin{macrocode} \def\UTFviii@four@octets#1#2#3#4{\expandafter \UTFviii@defined\csname u8:#1\string#2\string#3\string#4\endcsname} % \end{macrocode} % \end{macro} % % \begin{macro}{\UTFviii@defined} % This tests whether its argument is different from |\relax|: it % either calls for a sensible error message (not done), or it gets % the |\fi| out of the way (in case the command has arguments) and % executes it. % \begin{macrocode} \def\UTFviii@defined#1{% \ifx#1\relax % \end{macrocode} % The endline character has a special definition within the % inputenc package (it is gobbling spaces). For this reason we % can't produce multiline strings without some precaution. % \changes{v1.1b}{2004/02/09}{No newlines allowed in error messages} % \changes{v1.1g}{2005/09/27}{Real spaces do not show up so use \cs{space}} % \begin{macrocode} \PackageError{inputenc}{Unicode\space char\space \string#1\space not\space set\space up\space for\space use\space with\space LaTeX}\@eha \else\expandafter #1% \fi } % \end{macrocode} % \end{macro} % % \begin{macro}{\UTFviii@loop} % This wonderful bit of code from Dr Carlisle defines the starting % octets to call |\UTFviii@two@octets| etc as appropriate. The starting % octet itself is passed directly as the first argument, the others % are picked up later en route. % % The |\UTFviii@loop| loops through the numbers starting at % |\count@| and ending at |\@tempcnta|${} - 1$, each time executing % the code in |\UTFviii@tmp|. % % All this is done in a group so that temporary catcode changes % etc.~vanish after everything is set up. % % It may be a good idea to add code to deal with `illegal utf8 octets': % at present these will be handled by whatever code was in use for 8-bit % input before this code is executed. % % \begin{macrocode} \begingroup \catcode`\~13 \catcode`\"12 % \end{macrocode} % % \begin{macrocode} \def\UTFviii@loop{% \uccode`\~\count@ \uppercase\expandafter{\UTFviii@tmp}% \advance\count@\@ne \ifnum\count@<\@tempcnta \expandafter\UTFviii@loop \fi} % \end{macrocode} % % Setting up 2-byte UTF-8: % \begin{macrocode} \count@"C2 \@tempcnta"E0 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\string~}} \UTFviii@loop % \end{macrocode} % Setting up 3-byte UTF-8: % \begin{macrocode} \count@"E0 \@tempcnta"F0 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\string~}} \UTFviii@loop % \end{macrocode} % % Setting up 4-byte UTF-8: % \begin{macrocode} \count@"F0 \@tempcnta"F4 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\string~}} \UTFviii@loop \endgroup % \end{macrocode} % \end{macro} % % For this case we must disable the warning generated by % \texttt{inputenc} if it doesn't see any new |\DeclareInputText| % commands. % \begin{macrocode} \@inpenc@test % \end{macrocode} % % % If this file (\texttt{utf8.def}) is not being read while setting % up \texttt{inputenc}, i.e.~in the preamble, but when % |\inputencoding| is called somewhere within the document, we do not % need to input the specific Unicode mappings again. We therefore % stop reading the file at this point. % \begin{macrocode} \ifx\@begindocumenthook\@undefined \makeatother % \end{macrocode} % The |\fi| must be on the same line as |\endinput| or else it will % never be seen! % \begin{macrocode} \endinput \fi % \end{macrocode} % % % \subsection{Mapping Unicode codes to \LaTeX{} internal forms} % % % \begin{macro}{\DeclareUnicodeCharacter} % The |\DeclareUnicodeCharacter| declaration defines a mapping from % a Unicode character code point to a \LaTeX{} internal form. The first % argument is the Unicode number as hexadecimal digits and the second is % the actual \LaTeX{} internal form. % % We start by making sure that some characters have the right % |\catcode| when they are used in the definitions below. % \begin{macrocode} \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 % \end{macrocode} % % \begin{macrocode} \gdef\DeclareUnicodeCharacter#1#2{% \count@"#1\relax \wlog{ \space\space defining Unicode char U+#1 (decimal \the\count@)}% \begingroup % \end{macrocode} % Next we do the parsing of the number stored in |\count@| and assign the % result to |\UTFviii@tmp|. Actually all this could be done in-line, % the macro |\parse@XML@charref| is only there to extend this code % to parsing Unicode numbers in other contexts one day (perhaps). % \begin{macrocode} \parse@XML@charref % \end{macrocode} % % Here is an example of what is happening, for the pair \texttt{"C2 "A3} % (which is the utf8 represenation for the character \textsterling{}). % After |\parse@XML@charref| we have, stored in |\UTFviii@tmp|, a % single command with two character tokens as arguments: % \begin{quote} % [$t_{C2}$ and $t_{A3}$ are the characters corresponding to these % two octets]\\ % |\UTFviii@two@octets| $t_{\rm C2}t_{\rm A3}$ % \end{quote} % what we actually need to produce is a definition of the form % \begin{quote} % |\def\u8:|$t_{\rm C2}$$t_{\rm A3}$ |{|\textit{\LaTeX{} internal form}|}|\,. % \end{quote} % So here we temporarily redefine the prefix commands % |\UTFviii@two@octets|, etc.~to % generate the csname that we wish to define> the |\string|s are % added in case these tokens are still active. % \begin{macrocode} \def\UTFviii@two@octets##1##2{\csname u8:##1\string##2\endcsname}% \def\UTFviii@three@octets##1##2##3{\csname u8:##1% \string##2\string##3\endcsname}% \def\UTFviii@four@octets##1##2##3##4{\csname u8:##1% \string##2\string##3\string##4\endcsname}% % \end{macrocode} % Now we simply:-) need to use the right number of |\expandafter|s to % finally construct the definition: expanding |\UTFviii@tmp| once to get % its contents, a second time to replace the prefix command by its % |\csname| expansion, and a third time to turn the expansion into % a csname after which the |\gdef| finally gets applied. % We add an irrelevant |\IeC| and braces around the definition, in % order to avoid any space after the command being gobbled up % when the text is written out to an auxiliary file (see % \texttt{inputenc} for further details % \begin{macrocode} \expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \expandafter \gdef\UTFviii@tmp{\IeC{#2}}% \endgroup } % \end{macrocode} % \end{macro} % % % \begin{macro}{\parse@XML@charref} % This macro parses a Unicode number (decimal) and returns its % UTF-8 representation as a sequence of non-active \TeX{} character % tokens. In the % original code it had two arguments delimited by \texttt{;} here, % however, we supply the Unicode number implicitly. % \begin{macrocode} \gdef\parse@XML@charref{% % \end{macrocode} % We need to keep a few things local, mainly the |\uccode|'s that % are set up below. However, the group originally used here is % actually unnecessary since we call this macro only within another % group; but it will be important to restore the group if this % macro gets used for other purposes. % \begin{macrocode} % \begingroup % \end{macrocode} % The original code from David supported the convention that a % Unicode slot number could be given either as a decimal or as a % hexadecimal (by starting with \texttt{x}). We do not do this so % this code is also removed. This could be reactivated if one % wants to support document commands that accept Unicode numbers % (but then the first case needs to be changed from an error % message back to something more useful again). % \begin{macrocode} % \uppercase{\count@\if x\noexpand#1"\else#1\fi#2}\relax % \end{macrocode} % As |\count@| already contains the right value we make % |\parse@XML@charref| work without arguments. % \changes{v1.1g}{2005/09/27}{Real spaces do not show up so use \cs{space}} % \begin{macrocode} \ifnum\count@<"A0\relax \PackageError{inputenc}{Cannot\space define\space Unicode\space char\space value\space <\space 00A0}\@eha % \end{macrocode} % Do not ask us to provide an explanation for the code below, it is % borrowed straight from \texttt{xmltex} by David and we trust him % totally (and we are too lazy to reread the Unicode book to see if % this is the correct algorithm).\footnote{We were hoping to also % find in his work the \TeX{} code for going the other way: from % UTF-8 octets to Unicode slot number, but no luck!} % \begin{macrocode} \else\ifnum\count@<"800\relax \parse@UTFviii@a,% \parse@UTFviii@b C\UTFviii@two@octets.,% \else\ifnum\count@<"10000\relax \parse@UTFviii@a;% \parse@UTFviii@a,% \parse@UTFviii@b E\UTFviii@three@octets.{,;}% \else \parse@UTFviii@a;% \parse@UTFviii@a,% \parse@UTFviii@a!% \parse@UTFviii@b F\UTFviii@four@octets.{!,;}% \fi \fi \fi % \endgroup } % \end{macrocode} % \end{macro} % % \begin{macro}{\parse@UTFviii@a} % \ldots so somebody else can document this part :-) \ldots~David?:-))))! % \changes{v1.1b}{2004/02/09}{Space in the wrong place \cs{count @64}} % \begin{macrocode} \gdef\parse@UTFviii@a#1{% \@tempcnta\count@ \divide\count@ 64 \@tempcntb\count@ \multiply\count@ 64 \advance\@tempcnta-\count@ \advance\@tempcnta 128 \uccode`#1\@tempcnta \count@\@tempcntb} % \end{macrocode} % \end{macro} % % \begin{macro}{\parse@UTFviii@b} % \ldots same here % \begin{macrocode} \gdef\parse@UTFviii@b#1#2#3#4{% \advance\count@ "#10\relax \uccode`#3\count@ \uppercase{\gdef\UTFviii@tmp{#2#3#4}}} % \end{macrocode} % % \begin{macrocode} \endgroup % \end{macrocode} % \end{macro} % % \begin{macrocode} \@onlypreamble\DeclareUnicodeCharacter % \end{macrocode} % These are preamble only as long as we don't support Unicode % charrefs in documents. % \begin{macrocode} \@onlypreamble\parse@XML@charref \@onlypreamble\parse@UTFviii@a \@onlypreamble\parse@UTFviii@b % \end{macrocode} % % % \subsection{Loading Unicode mappings at begin document} % % The original plan was to set up the UTF-8 support at % |\begin{document}|; but then any text characters used in the preamble % (as people do even though advised against it) would fail in one way or % the other. % So the implementation was changed and the Unicode definition files % for already defined encodings are loaded here. % % We loop through all defined font encodings % (stored in |\cdp@list|) and for each load a file % \textit{name}\texttt{enc.dfu} if it exist. That file is then % supposed to contain |\DeclareUnicodeCharacter| declarations. % \begin{macrocode} \begingroup \def\cdp@elt#1#2#3#4{% \wlog{Now handling font encoding #1 ...}% \lowercase{% \InputIfFileExists{#1enc.dfu}}% {\wlog{... processing UTF-8 mapping file for font encoding #1}% % \end{macrocode} % From this point on we ignore spaces again, i.e., while we are % reading the \texttt{.dfu} file. The |\endgroup| below will % restore it again. % \changes{v1.1d}{2004/05/08}{Explicitly set catcode of space} % \changes{v1.1g}{2005/09/27}{We lost the ``false'' case} % \begin{macrocode} \catcode`\ 9\relax}% {\wlog{... no UTF-8 mapping file for font encoding #1}}% } \cdp@list \endgroup % \end{macrocode} % However, we don't know if there are font encodings still to be % loaded (either with \texttt{fontenc} or directly with |\input| by % some some package). Font enconding files are loaded only if the % corresponding encoding has not been loaded yet, and they always % begin with |\DeclareFontEncoding|. We now redefine the internal % kernel version of the latter to load the Unicode file if available. % % \begin{macrocode} \def\DeclareFontEncoding@#1#2#3{% \expandafter \ifx\csname T@#1\endcsname\relax \def\cdp@elt{\noexpand\cdp@elt}% \xdef\cdp@list{\cdp@list\cdp@elt{#1}% {\default@family}{\default@series}% {\default@shape}}% \expandafter\let\csname#1-cmd\endcsname\@changed@cmd \begingroup \wlog{Now handling font encoding #1 ...}% \lowercase{% \InputIfFileExists{#1enc.dfu}}% {\wlog{... processing UTF-8 mapping file for font encoding #1}}% {\wlog{... no UTF-8 mapping file for font encoding #1}}% \endgroup \else \@font@info{Redeclaring font encoding #1}% \fi \global\@namedef{T@#1}{#2}% \global\@namedef{M@#1}{\default@M#3}% \xdef\LastDeclaredEncoding{#1}% } % % \end{macrocode} % % % % \section{Mapping characters ---\newline based on font (glyph) encodings} % % This section is a first attempt to provide Unicode definitions for % characters whose standard glyphs are currently provided by the % standard \LaTeX{} font-encodings |T1|, |OT1|, etc. They are by % no means completed and need checking. % % For example, one should check the already existing input encodings % for glyphs that may in fact be available and required, % e.g.~\texttt{latin4} has a number of glyphs with the |\=| % accent. Since the |T1| encoding does not provide such glyphs, % these characters are not listed below (yet). % % The list below was generated by looking at the current \LaTeX{} font % encoding files, e.g., \texttt{t1enc.def} and using the work by % Sebastian Rahtz in (\texttt{ucharacters.sty}), with a few % modifications. In combinations such as |\^\i| the preferred form % is that and not |\^i|. % % This list has been built from several sources, obviously including % the Unicode Standard itself. These sources include Passive \TeX{} by % Sebastian Rahtz, the \texttt{unicode} % package by Dominique P. G. Unruh (mainly for Latin encodings) and % \texttt{text4ht} by Eitan Gurari (for Cyrillic ones). % % Note that it strictly follows the Mittelbach principles for % input character encodings: thus it offers no support for using utf8 % representations of math symbols such as $\times$ or $\div$ (in math mode). % % % \subsection{About the table itself} % % In addition to generating indivdual files, the table below is, at present, % a one-one (we think) partial relationship between the (ill-defined) set % of LICRs and the Unicode slots "0080 to "FFFF. At present these entries % are used only to define a collection of partial mappings from Unicode % slots to LICRs; each of these mappings becomes full if we add an exception % value (`not defined') to the set of LICRs. % % It is probably not essential for the relationship in the full table to be % one-one; this raises questions suach as: the exact role of LICRs; % the formal relationships on the set of LICRs; the (non-mathematical) % relationship between % LICRs and Unicode (which has its own somewhat fuzzy equivalences); % and ultimately what a character is and what a character representation % and/or name is. % % Viewed this a way, the result has, perhaps puzzingly, just two (we think) % gaps in the second 128 `Unicode slots' (00A0 and 00AD): neither of these % is really a character, of course. % % It is unclear the extent to which entries in this table should % resemble the closely related ones in the 8-bit \texttt{inputenc} files. % The Unicode standard claims that the first 256 slots `are' ASCII and % Latin-1. % % Of course, \TeX{} itself typically does not treat even many perfectly % `normal text' 7-bit slots as text characters, so it is unclear % whether \LaTeX{} should even attempt to deal in any consistent way with % those Unicode slots that are not definitive text characters. % % % \subsection{The mapping table} % % Note that the first argument must be a 4-hex-digit number greater % than \texttt{00BF}. % % There are few notes about inconsistencies etc at the end of the table. % % \begin{macrocode} %\DeclareUnicodeCharacter{00A1}{\textexclamdown} %\DeclareUnicodeCharacter{00A2}{\textcent} %\DeclareUnicodeCharacter{00A3}{\textsterling} %\DeclareUnicodeCharacter{00A4}{\textcurrency} %\DeclareUnicodeCharacter{00A5}{\textyen} %\DeclareUnicodeCharacter{00A6}{\textbrokenbar} %\DeclareUnicodeCharacter{00A7}{\textsection} %\DeclareUnicodeCharacter{00A8}{\textasciidieresis} %\DeclareUnicodeCharacter{00A9}{\textcopyright} %\DeclareUnicodeCharacter{00AA}{\textordfeminine} %\DeclareUnicodeCharacter{00AB}{\guillemotleft} %\DeclareUnicodeCharacter{00AC}{\textlnot} %\DeclareUnicodeCharacter{00AE}{\textregistered} %\DeclareUnicodeCharacter{00AF}{\textasciimacron} %\DeclareUnicodeCharacter{00B0}{\textdegree} %\DeclareUnicodeCharacter{00B1}{\textpm} %\DeclareUnicodeCharacter{00B2}{\texttwosuperior} %\DeclareUnicodeCharacter{00B3}{\textthreesuperior} %\DeclareUnicodeCharacter{00B4}{\textasciiacute} %\DeclareUnicodeCharacter{00B5}{\textmu} % micro sign %\DeclareUnicodeCharacter{00B6}{\textparagraph} %\DeclareUnicodeCharacter{00B7}{\textperiodcentered} %\DeclareUnicodeCharacter{00B8}{\c\ } %\DeclareUnicodeCharacter{00B9}{\textonesuperior} %\DeclareUnicodeCharacter{00BA}{\textordmasculine} %\DeclareUnicodeCharacter{00BB}{\guillemotright} %\DeclareUnicodeCharacter{00BC}{\textonequarter} %\DeclareUnicodeCharacter{00BD}{\textonehalf} %\DeclareUnicodeCharacter{00BE}{\textthreequarters} %\DeclareUnicodeCharacter{00BF}{\textquestiondown} %\DeclareUnicodeCharacter{00C0}{\@tabacckludge`A} %\DeclareUnicodeCharacter{00C1}{\@tabacckludge'A} %\DeclareUnicodeCharacter{00C2}{\^A} %\DeclareUnicodeCharacter{00C3}{\~A} %\DeclareUnicodeCharacter{00C4}{\"A} %\DeclareUnicodeCharacter{00C5}{\r A} %\DeclareUnicodeCharacter{00C6}{\AE} %\DeclareUnicodeCharacter{00C7}{\c C} %\DeclareUnicodeCharacter{00C8}{\@tabacckludge`E} %\DeclareUnicodeCharacter{00C9}{\@tabacckludge'E} %\DeclareUnicodeCharacter{00CA}{\^E} %\DeclareUnicodeCharacter{00CB}{\"E} %\DeclareUnicodeCharacter{00CC}{\@tabacckludge`I} %\DeclareUnicodeCharacter{00CD}{\@tabacckludge'I} %\DeclareUnicodeCharacter{00CE}{\^I} %\DeclareUnicodeCharacter{00CF}{\"I} %\DeclareUnicodeCharacter{00D0}{\DH} %\DeclareUnicodeCharacter{00D1}{\~N} %\DeclareUnicodeCharacter{00D2}{\@tabacckludge`O} %\DeclareUnicodeCharacter{00D3}{\@tabacckludge'O} %\DeclareUnicodeCharacter{00D4}{\^O} %\DeclareUnicodeCharacter{00D5}{\~O} %\DeclareUnicodeCharacter{00D6}{\"O} %\DeclareUnicodeCharacter{00D7}{\texttimes} %\DeclareUnicodeCharacter{00D8}{\O} %\DeclareUnicodeCharacter{00D9}{\@tabacckludge`U} %\DeclareUnicodeCharacter{00DA}{\@tabacckludge'U} %\DeclareUnicodeCharacter{00DB}{\^U} %\DeclareUnicodeCharacter{00DC}{\"U} %\DeclareUnicodeCharacter{00DD}{\@tabacckludge'Y} %\DeclareUnicodeCharacter{00DE}{\TH} %\DeclareUnicodeCharacter{00DF}{\ss} %\DeclareUnicodeCharacter{00E0}{\@tabacckludge`a} %\DeclareUnicodeCharacter{00E1}{\@tabacckludge'a} %\DeclareUnicodeCharacter{00E2}{\^a} %\DeclareUnicodeCharacter{00E3}{\~a} %\DeclareUnicodeCharacter{00E4}{\"a} %\DeclareUnicodeCharacter{00E5}{\r a} %\DeclareUnicodeCharacter{00E6}{\ae} %\DeclareUnicodeCharacter{00E7}{\c c} %\DeclareUnicodeCharacter{00E8}{\@tabacckludge`e} %\DeclareUnicodeCharacter{00E9}{\@tabacckludge'e} %\DeclareUnicodeCharacter{00EA}{\^e} %\DeclareUnicodeCharacter{00EB}{\"e} %\DeclareUnicodeCharacter{00EC}{\@tabacckludge`\i} %\DeclareUnicodeCharacter{00ED}{\@tabacckludge'\i} %\DeclareUnicodeCharacter{00EE}{\^\i} %\DeclareUnicodeCharacter{00EF}{\"\i} %\DeclareUnicodeCharacter{00F0}{\dh} %\DeclareUnicodeCharacter{00F1}{\~n} %\DeclareUnicodeCharacter{00F2}{\@tabacckludge`o} %\DeclareUnicodeCharacter{00F3}{\@tabacckludge'o} %\DeclareUnicodeCharacter{00F4}{\^o} %\DeclareUnicodeCharacter{00F5}{\~o} %\DeclareUnicodeCharacter{00F6}{\"o} %\DeclareUnicodeCharacter{00F7}{\textdiv} %\DeclareUnicodeCharacter{00F8}{\o} %\DeclareUnicodeCharacter{00F9}{\@tabacckludge`u} %\DeclareUnicodeCharacter{00FA}{\@tabacckludge'u} %\DeclareUnicodeCharacter{00FB}{\^u} %\DeclareUnicodeCharacter{00FC}{\"u} %\DeclareUnicodeCharacter{00FD}{\@tabacckludge'y} %\DeclareUnicodeCharacter{00FE}{\th} %\DeclareUnicodeCharacter{00FF}{\"y} %\DeclareUnicodeCharacter{0102}{\u A} %\DeclareUnicodeCharacter{0103}{\u a} %\DeclareUnicodeCharacter{0104}{\k A} %\DeclareUnicodeCharacter{0105}{\k a} %\DeclareUnicodeCharacter{0106}{\@tabacckludge'C} %\DeclareUnicodeCharacter{0107}{\@tabacckludge'c} %\DeclareUnicodeCharacter{010C}{\v C} %\DeclareUnicodeCharacter{010D}{\v c} %\DeclareUnicodeCharacter{010E}{\v D} %\DeclareUnicodeCharacter{010F}{\v d} %\DeclareUnicodeCharacter{0110}{\DJ} %\DeclareUnicodeCharacter{0111}{\dj} %\DeclareUnicodeCharacter{0118}{\k E} %\DeclareUnicodeCharacter{0119}{\k e} %\DeclareUnicodeCharacter{011A}{\v E} %\DeclareUnicodeCharacter{011B}{\v e} %\DeclareUnicodeCharacter{011E}{\u G} %\DeclareUnicodeCharacter{011F}{\u g} %\DeclareUnicodeCharacter{0130}{\.I} %\DeclareUnicodeCharacter{0131}{\i} %\DeclareUnicodeCharacter{0132}{\IJ} %\DeclareUnicodeCharacter{0133}{\ij} %\DeclareUnicodeCharacter{0139}{\@tabacckludge'L} %\DeclareUnicodeCharacter{013A}{\@tabacckludge'l} %\DeclareUnicodeCharacter{013D}{\v L} %\DeclareUnicodeCharacter{013E}{\v l} %\DeclareUnicodeCharacter{0141}{\L} %\DeclareUnicodeCharacter{0142}{\l} %\DeclareUnicodeCharacter{0143}{\@tabacckludge'N} %\DeclareUnicodeCharacter{0144}{\@tabacckludge'n} %\DeclareUnicodeCharacter{0147}{\v N} %\DeclareUnicodeCharacter{0148}{\v n} %\DeclareUnicodeCharacter{014A}{\NG} %\DeclareUnicodeCharacter{014B}{\ng} %\DeclareUnicodeCharacter{0150}{\H O} %\DeclareUnicodeCharacter{0151}{\H o} %\DeclareUnicodeCharacter{0152}{\OE} %\DeclareUnicodeCharacter{0153}{\oe} %\DeclareUnicodeCharacter{0154}{\@tabacckludge'R} %\DeclareUnicodeCharacter{0155}{\@tabacckludge'r} %\DeclareUnicodeCharacter{0158}{\v R} %\DeclareUnicodeCharacter{0159}{\v r} %\DeclareUnicodeCharacter{015A}{\@tabacckludge'S} %\DeclareUnicodeCharacter{015B}{\@tabacckludge's} %\DeclareUnicodeCharacter{015E}{\c S} %\DeclareUnicodeCharacter{015F}{\c s} %\DeclareUnicodeCharacter{0160}{\v S} %\DeclareUnicodeCharacter{0161}{\v s} %\DeclareUnicodeCharacter{0162}{\c T} %\DeclareUnicodeCharacter{0163}{\c t} %\DeclareUnicodeCharacter{0164}{\v T} %\DeclareUnicodeCharacter{0165}{\v t} %\DeclareUnicodeCharacter{016E}{\r U} %\DeclareUnicodeCharacter{016F}{\r u} %\DeclareUnicodeCharacter{0170}{\H U} %\DeclareUnicodeCharacter{0171}{\H u} %\DeclareUnicodeCharacter{0178}{\"Y} %\DeclareUnicodeCharacter{0179}{\@tabacckludge'Z} %\DeclareUnicodeCharacter{017A}{\@tabacckludge'z} %\DeclareUnicodeCharacter{017B}{\.Z} %\DeclareUnicodeCharacter{017C}{\.z} %\DeclareUnicodeCharacter{017D}{\v Z} %\DeclareUnicodeCharacter{017E}{\v z} %\DeclareUnicodeCharacter{0192}{\textflorin} %\DeclareUnicodeCharacter{02C6}{\textasciicircum} %\DeclareUnicodeCharacter{02C7}{\textasciicaron} %\DeclareUnicodeCharacter{02DC}{\textasciitilde} %\DeclareUnicodeCharacter{02D8}{\textasciibreve} %\DeclareUnicodeCharacter{02DD}{\textacutedbl} %\DeclareUnicodeCharacter{0401}{\CYRYO} %\DeclareUnicodeCharacter{0402}{\CYRDJE} %\DeclareUnicodeCharacter{0404}{\CYRIE} %\DeclareUnicodeCharacter{0405}{\CYRDZE} %\DeclareUnicodeCharacter{0406}{\CYRII} %\DeclareUnicodeCharacter{0407}{\CYRYI} %\DeclareUnicodeCharacter{0408}{\CYRJE} %\DeclareUnicodeCharacter{0409}{\CYRLJE} %\DeclareUnicodeCharacter{040A}{\CYRNJE} %\DeclareUnicodeCharacter{040B}{\CYRTSHE} %\DeclareUnicodeCharacter{040E}{\CYRUSHRT} %\DeclareUnicodeCharacter{040F}{\CYRDZHE} %\DeclareUnicodeCharacter{0410}{\CYRA} %\DeclareUnicodeCharacter{0411}{\CYRB} %\DeclareUnicodeCharacter{0412}{\CYRV} %\DeclareUnicodeCharacter{0413}{\CYRG} %\DeclareUnicodeCharacter{0414}{\CYRD} %\DeclareUnicodeCharacter{0415}{\CYRE} %\DeclareUnicodeCharacter{0416}{\CYRZH} %\DeclareUnicodeCharacter{0417}{\CYRZ} %\DeclareUnicodeCharacter{0418}{\CYRI} %\DeclareUnicodeCharacter{0419}{\CYRISHRT} %\DeclareUnicodeCharacter{041A}{\CYRK} %\DeclareUnicodeCharacter{041B}{\CYRL} %\DeclareUnicodeCharacter{041C}{\CYRM} %\DeclareUnicodeCharacter{041D}{\CYRN} %\DeclareUnicodeCharacter{041E}{\CYRO} %\DeclareUnicodeCharacter{041F}{\CYRP} %\DeclareUnicodeCharacter{0420}{\CYRR} %\DeclareUnicodeCharacter{0421}{\CYRS} %\DeclareUnicodeCharacter{0422}{\CYRT} %\DeclareUnicodeCharacter{0423}{\CYRU} %\DeclareUnicodeCharacter{0424}{\CYRF} %\DeclareUnicodeCharacter{0425}{\CYRH} %\DeclareUnicodeCharacter{0426}{\CYRC} %\DeclareUnicodeCharacter{0427}{\CYRCH} %\DeclareUnicodeCharacter{0428}{\CYRSH} %\DeclareUnicodeCharacter{0429}{\CYRSHCH} %\DeclareUnicodeCharacter{042A}{\CYRHRDSN} %\DeclareUnicodeCharacter{042B}{\CYRERY} %\DeclareUnicodeCharacter{042C}{\CYRSFTSN} %\DeclareUnicodeCharacter{042D}{\CYREREV} %\DeclareUnicodeCharacter{042E}{\CYRYU} %\DeclareUnicodeCharacter{042F}{\CYRYA} %\DeclareUnicodeCharacter{0430}{\cyra} %\DeclareUnicodeCharacter{0431}{\cyrb} %\DeclareUnicodeCharacter{0432}{\cyrv} %\DeclareUnicodeCharacter{0433}{\cyrg} %\DeclareUnicodeCharacter{0434}{\cyrd} %\DeclareUnicodeCharacter{0435}{\cyre} %\DeclareUnicodeCharacter{0436}{\cyrzh} %\DeclareUnicodeCharacter{0437}{\cyrz} %\DeclareUnicodeCharacter{0438}{\cyri} %\DeclareUnicodeCharacter{0439}{\cyrishrt} %\DeclareUnicodeCharacter{043A}{\cyrk} %\DeclareUnicodeCharacter{043B}{\cyrl} %\DeclareUnicodeCharacter{043C}{\cyrm} %\DeclareUnicodeCharacter{043D}{\cyrn} %\DeclareUnicodeCharacter{043E}{\cyro} %\DeclareUnicodeCharacter{043F}{\cyrp} %\DeclareUnicodeCharacter{0440}{\cyrr} %\DeclareUnicodeCharacter{0441}{\cyrs} %\DeclareUnicodeCharacter{0442}{\cyrt} %\DeclareUnicodeCharacter{0443}{\cyru} %\DeclareUnicodeCharacter{0444}{\cyrf} %\DeclareUnicodeCharacter{0445}{\cyrh} %\DeclareUnicodeCharacter{0446}{\cyrc} %\DeclareUnicodeCharacter{0447}{\cyrch} %\DeclareUnicodeCharacter{0448}{\cyrsh} %\DeclareUnicodeCharacter{0449}{\cyrshch} %\DeclareUnicodeCharacter{044A}{\cyrhrdsn} %\DeclareUnicodeCharacter{044B}{\cyrery} %\DeclareUnicodeCharacter{044C}{\cyrsftsn} %\DeclareUnicodeCharacter{044D}{\cyrerev} %\DeclareUnicodeCharacter{044E}{\cyryu} %\DeclareUnicodeCharacter{044F}{\cyrya} %\DeclareUnicodeCharacter{0451}{\cyryo} %\DeclareUnicodeCharacter{0452}{\cyrdje} %\DeclareUnicodeCharacter{0454}{\cyrie} %\DeclareUnicodeCharacter{0455}{\cyrdze} %\DeclareUnicodeCharacter{0456}{\cyrii} %\DeclareUnicodeCharacter{0457}{\cyryi} %\DeclareUnicodeCharacter{0458}{\cyrje} %\DeclareUnicodeCharacter{0459}{\cyrlje} %\DeclareUnicodeCharacter{045A}{\cyrnje} %\DeclareUnicodeCharacter{045B}{\cyrtshe} %\DeclareUnicodeCharacter{045E}{\cyrushrt} %\DeclareUnicodeCharacter{045F}{\cyrdzhe} %\DeclareUnicodeCharacter{0462}{\CYRYAT} %\DeclareUnicodeCharacter{0463}{\cyryat} %\DeclareUnicodeCharacter{046A}{\CYRBYUS} %\DeclareUnicodeCharacter{046B}{\cyrbyus} %\DeclareUnicodeCharacter{0472}{\CYRFITA} %\DeclareUnicodeCharacter{0473}{\cyrfita} %\DeclareUnicodeCharacter{0474}{\CYRIZH} %\DeclareUnicodeCharacter{0475}{\cyrizh} %\DeclareUnicodeCharacter{048C}{\CYRSEMISFTSN} %\DeclareUnicodeCharacter{048D}{\cyrsemisftsn} %\DeclareUnicodeCharacter{048E}{\CYRRTICK} %\DeclareUnicodeCharacter{048F}{\cyrrtick} %\DeclareUnicodeCharacter{0490}{\CYRGUP} %\DeclareUnicodeCharacter{0491}{\cyrgup} %\DeclareUnicodeCharacter{0492}{\CYRGHCRS} %\DeclareUnicodeCharacter{0493}{\cyrghcrs} %\DeclareUnicodeCharacter{0494}{\CYRGHK} %\DeclareUnicodeCharacter{0495}{\cyrghk} %\DeclareUnicodeCharacter{0496}{\CYRZHDSC} %\DeclareUnicodeCharacter{0497}{\cyrzhdsc} %\DeclareUnicodeCharacter{0498}{\CYRZDSC} %\DeclareUnicodeCharacter{0499}{\cyrzdsc} %\DeclareUnicodeCharacter{049A}{\CYRKDSC} %\DeclareUnicodeCharacter{049B}{\cyrkdsc} %\DeclareUnicodeCharacter{049C}{\CYRKVCRS} %\DeclareUnicodeCharacter{049D}{\cyrkvcrs} %\DeclareUnicodeCharacter{049E}{\CYRKHCRS} %\DeclareUnicodeCharacter{049F}{\cyrkhcrs} %\DeclareUnicodeCharacter{04A0}{\CYRKBEAK} %\DeclareUnicodeCharacter{04A1}{\cyrkbeak} %\DeclareUnicodeCharacter{04A2}{\CYRNDSC} %\DeclareUnicodeCharacter{04A3}{\cyrndsc} %\DeclareUnicodeCharacter{04A4}{\CYRNG} %\DeclareUnicodeCharacter{04A5}{\cyrng} %\DeclareUnicodeCharacter{04A6}{\CYRPHK} %\DeclareUnicodeCharacter{04A7}{\cyrphk} %\DeclareUnicodeCharacter{04A8}{\CYRABHHA} %\DeclareUnicodeCharacter{04A9}{\cyrabhha} %\DeclareUnicodeCharacter{04AA}{\CYRSDSC} %\DeclareUnicodeCharacter{04AB}{\cyrsdsc} %\DeclareUnicodeCharacter{04AC}{\CYRTDSC} %\DeclareUnicodeCharacter{04AD}{\cyrtdsc} %\DeclareUnicodeCharacter{04AE}{\CYRY} %\DeclareUnicodeCharacter{04AF}{\cyry} %\DeclareUnicodeCharacter{04B0}{\CYRYHCRS} %\DeclareUnicodeCharacter{04B1}{\cyryhcrs} %\DeclareUnicodeCharacter{04B2}{\CYRHDSC} %\DeclareUnicodeCharacter{04B3}{\cyrhdsc} %\DeclareUnicodeCharacter{04B4}{\CYRTETSE} %\DeclareUnicodeCharacter{04B5}{\cyrtetse} %\DeclareUnicodeCharacter{04B6}{\CYRCHRDSC} %\DeclareUnicodeCharacter{04B7}{\cyrchrdsc} %\DeclareUnicodeCharacter{04B8}{\CYRCHVCRS} %\DeclareUnicodeCharacter{04B9}{\cyrchvcrs} %\DeclareUnicodeCharacter{04BA}{\CYRSHHA} %\DeclareUnicodeCharacter{04BB}{\cyrshha} %\DeclareUnicodeCharacter{04BC}{\CYRABHCH} %\DeclareUnicodeCharacter{04BD}{\cyrabhch} %\DeclareUnicodeCharacter{04BE}{\CYRABHCHDSC} %\DeclareUnicodeCharacter{04BF}{\cyrabhchdsc} %\DeclareUnicodeCharacter{04C0}{\CYRpalochka} %\DeclareUnicodeCharacter{04C3}{\CYRKHK} %\DeclareUnicodeCharacter{04C4}{\cyrkhk} %\DeclareUnicodeCharacter{04C5}{\CYRLDSC} %\DeclareUnicodeCharacter{04C6}{\cyrldsc} %\DeclareUnicodeCharacter{04C7}{\CYRNHK} %\DeclareUnicodeCharacter{04C8}{\cyrnhk} %\DeclareUnicodeCharacter{04CB}{\CYRCHLDSC} %\DeclareUnicodeCharacter{04CC}{\cyrchldsc} %\DeclareUnicodeCharacter{04CD}{\CYRMDSC} %\DeclareUnicodeCharacter{04CE}{\cyrmdsc} %\DeclareUnicodeCharacter{04D4}{\CYRAE} %\DeclareUnicodeCharacter{04D5}{\cyrae} %\DeclareUnicodeCharacter{04D8}{\CYRSCHWA} %\DeclareUnicodeCharacter{04D9}{\cyrschwa} %\DeclareUnicodeCharacter{04E0}{\CYRABHDZE} %\DeclareUnicodeCharacter{04E1}{\cyrabhdze} %\DeclareUnicodeCharacter{04E8}{\CYROTLD} %\DeclareUnicodeCharacter{04E9}{\cyrotld} %\DeclareUnicodeCharacter{0E3F}{\textbaht} %\DeclareUnicodeCharacter{200C}{\textcompwordmark} %\DeclareUnicodeCharacter{2013}{\textendash} %\DeclareUnicodeCharacter{2014}{\textemdash} %\DeclareUnicodeCharacter{2016}{\textbardbl} %\DeclareUnicodeCharacter{2018}{\textquoteleft} %\DeclareUnicodeCharacter{2019}{\textquoteright} %\DeclareUnicodeCharacter{201A}{\quotesinglbase} %\DeclareUnicodeCharacter{201C}{\textquotedblleft} %\DeclareUnicodeCharacter{201D}{\textquotedblright} %\DeclareUnicodeCharacter{201E}{\quotedblbase} %\DeclareUnicodeCharacter{2020}{\textdagger} %\DeclareUnicodeCharacter{2021}{\textdaggerdbl} %\DeclareUnicodeCharacter{2022}{\textbullet} %\DeclareUnicodeCharacter{2026}{\textellipsis} %\DeclareUnicodeCharacter{2030}{\textperthousand} %\DeclareUnicodeCharacter{2031}{\textpertenthousand} %\DeclareUnicodeCharacter{2039}{\guilsinglleft} %\DeclareUnicodeCharacter{203A}{\guilsinglright} %\DeclareUnicodeCharacter{203B}{\textreferencemark} %\DeclareUnicodeCharacter{203D}{\textinterrobang} %\DeclareUnicodeCharacter{2044}{\textfractionsolidus} %\DeclareUnicodeCharacter{204E}{\textasteriskcentered} % LOW ASTERISK %\DeclareUnicodeCharacter{2052}{\textdiscount} %\DeclareUnicodeCharacter{20A1}{\textcolonmonetary} %\DeclareUnicodeCharacter{20A4}{\textlira} %\DeclareUnicodeCharacter{20A6}{\textnaira} %\DeclareUnicodeCharacter{20A9}{\textwon} %\DeclareUnicodeCharacter{20AB}{\textdong} %\DeclareUnicodeCharacter{20AC}{\texteuro} %\DeclareUnicodeCharacter{20B1}{\textpeso} %\DeclareUnicodeCharacter{2103}{\textcelsius} %\DeclareUnicodeCharacter{2116}{\textnumero} %\DeclareUnicodeCharacter{2117}{\textcircledP} %\DeclareUnicodeCharacter{211E}{\textrecipe} %\DeclareUnicodeCharacter{2120}{\textservicemark} %\DeclareUnicodeCharacter{2122}{\texttrademark} %\DeclareUnicodeCharacter{2126}{\textohm} %\DeclareUnicodeCharacter{2127}{\textmho} %\DeclareUnicodeCharacter{212E}{\textestimated} %\DeclareUnicodeCharacter{2190}{\textleftarrow} %\DeclareUnicodeCharacter{2191}{\textuparrow} %\DeclareUnicodeCharacter{2192}{\textrightarrow} %\DeclareUnicodeCharacter{2193}{\textdownarrow} %\DeclareUnicodeCharacter{2329}{\textlangle} %\DeclareUnicodeCharacter{232A}{\textrangle} %\DeclareUnicodeCharacter{2422}{\textblank} %\DeclareUnicodeCharacter{2423}{\textvisiblespace} %\DeclareUnicodeCharacter{25E6}{\textopenbullet} %\DeclareUnicodeCharacter{25EF}{\textbigcircle} %\DeclareUnicodeCharacter{266A}{\textmusicalnote} % \end{macrocode} % % \subsection{Notes} % % \changes{v1.1e}{2004/05/22}{Added notes on inconsistency with `8-bit files'.} % The following inputs are inconsistent with the 8-bit inputenc files % since they will always only produce the `text character'. This is an % area where inputenc is notoriously confused. % \begin{verbatim} % %\DeclareUnicodeCharacter{00A3}{\textsterling} % %\DeclareUnicodeCharacter{00A7}{\textsection} % %\DeclareUnicodeCharacter{00A9}{\textcopyright} % %\DeclareUnicodeCharacter{00B1}{\textpm} % %\DeclareUnicodeCharacter{00B6}{\textparagraph} % %\DeclareUnicodeCharacter{2020}{\textdagger} % %\DeclareUnicodeCharacter{2021}{\textdaggerdbl} % %\DeclareUnicodeCharacter{2026}{\textellipsis} % \end{verbatim} % % The following definitions are in an encoding file but have no % direct equivalent in Unicode, or they simply do not make sense in that % context (or we have not yet found anything or \ldots :-). For % example, the non-combining accent charcaters are certainly % available somehwere but these are not equivalent to a \TeX{} % accent command. %\begin{verbatim} %\DeclareTextSymbol{\j}{OT1}{17} %\DeclareTextSymbol{\SS}{T1}{223} %\DeclareTextSymbol{\textcompwordmark}{T1}{23} % %\DeclareTextAccent{\"}{OT1}{127} %\DeclareTextAccent{\'}{OT1}{19} %\DeclareTextAccent{\.}{OT1}{95} %\DeclareTextAccent{\=}{OT1}{22} %\DeclareTextAccent{\H}{OT1}{125} %\DeclareTextAccent{\^}{OT1}{94} %\DeclareTextAccent{\`}{OT1}{18} %\DeclareTextAccent{\r}{OT1}{23} %\DeclareTextAccent{\u}{OT1}{21} %\DeclareTextAccent{\v}{OT1}{20} %\DeclareTextAccent{\~}{OT1}{126} %\DeclareTextCommand{\b}{OT1}[1] %\DeclareTextCommand{\c}{OT1}[1] %\DeclareTextCommand{\d}{OT1}[1] %\DeclareTextCommand{\k}{T1}[1] %\end{verbatim} % % % % \subsection{Mappings for OT1 glyphs} % % This is even more incomplete as again it covers only the single % glyphs from |OT1| plus some that have been explicitly defined for % this encoding. Everything that is provided in |T1|, and that % could be provided as composite glyphs via |OT1|, could and % probably should be set up as well. Which leaves the many things % that are not provided in |T1| but can be provided in |OT1| (and % in |T1|) by composite glyphs. % \begin{macrocode} % \end{macrocode} % Stuff not mapped (note that |\j| ($\jmath$) is not equivalent to any % Unicode character): %\begin{verbatim} %\DeclareTextSymbol{\j}{OT1}{17} %\DeclareTextAccent{\"}{OT1}{127} %\DeclareTextAccent{\'}{OT1}{19} %\DeclareTextAccent{\.}{OT1}{95} %\DeclareTextAccent{\=}{OT1}{22} %\DeclareTextAccent{\^}{OT1}{94} %\DeclareTextAccent{\`}{OT1}{18} %\DeclareTextAccent{\~}{OT1}{126} %\DeclareTextAccent{\H}{OT1}{125} %\DeclareTextAccent{\u}{OT1}{21} %\DeclareTextAccent{\v}{OT1}{20} %\DeclareTextAccent{\r}{OT1}{23} %\DeclareTextCommand{\b}{OT1}[1] %\DeclareTextCommand{\c}{OT1}[1] %\DeclareTextCommand{\d}{OT1}[1] %\end{verbatim} % % % % \subsection{Mappings for OMS glyphs} % % Characters like |\textbackslash| are not mapped as they are % (primarily) only in the lower 127 and the code here only sets up % mappings for UTF-8 characters that are at least 2 octets long. %\begin{verbatim} %\DeclareTextSymbol{\textbackslash}{OMS}{110} % "6E %\DeclareTextSymbol{\textbar}{OMS}{106} % "6A %\DeclareTextSymbol{\textbraceleft}{OMS}{102} % "66 %\DeclareTextSymbol{\textbraceright}{OMS}{103} % "67 %\end{verbatim} % % But the following (and some others) might actually lurk in Unicode % somewhere\ldots %\begin{verbatim} %\DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03 %\DeclareTextCommand{\textcircled}{OMS} %\end{verbatim} % % % % % \subsection{Mappings for TS1 glyphs} % % Exercise for somebody else. % % % \subsection{Mappings for \texttt{latex.ltx} glyphs} % % There is also a collection of characters already set up in the kernel, % one way or the other. Since these do not clearly relate to any % particular font encoding they are mapped when the % \texttt{utf8} support is first set up. % % Also there are a number of |\providecommand|s in the various input % encoding files which may or may not go into this part. % \changes{v1.1b}{2004/02/09}{Added commands already defined in the kernel} % \begin{macrocode} %<*utf8> % This space is intentionally empty ... % % \end{macrocode} % % % \section{A test document} % % Here is a very small test document which may or may not survive % if the current document is transfered from one place to the % other. % \begin{macrocode} %<*test> \documentclass{article} \usepackage[latin1,utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{trace} \scrollmode % to run past the error below \begin{document} German umlauts in UTF-8: ^^c3^^a4^^c3^^b6^^c3^^bc %%% äöü \inputencoding{latin1} % switch to latin1 German umlauts in UTF-8 but read by latin1 (and will produce one error since \verb=\textcurrency= is not provided): ^^c3^^a4^^c3^^b6^^c3^^bc \inputencoding{utf8} % switch back to utf8 German umlauts in UTF-8: ^^c3^^a4^^c3^^b6^^c3^^bc Some codes that should produce errors as nothing is set up for them: ^^c3F ^^e1^^a4^^b6 And some that are not legal utf8 sequences: ^^c3X ^^e1XY \showoutput \tracingstats=2 \stop % % \end{macrocode} % % \Finale % \endinput