1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
32 \documentclass{ltxdoc}
33 \GetFileInfo{utf8.def}
34 \title{Providing some UTF-8 support via \texttt{inputenc}}
35 \date{\fileversion\space\filedate{} printed \today}
37 Frank Mittelbach \and Chris Rowley\thanks{Borrowing heavily from
38 code by David Carlisle and tables by Sebastian Rahtz; some table
39 and code cleanup by Javier Bezos}}
40 \usepackage[utf8]{inputenc}
42 \MaintainedByLaTeXTeam{latex}
45 \DocInput{utf8ienc.dtx}
54 % \section{Introduction}
56 % [The whole section is rather unfinished \ldots\ just like the code, sorry!]
58 % \subsection{Background and general stuff}
60 % For many reasons what this package provides is a long way from any
61 % type of `Unicode compliance'.
63 % In stark contrast to 8-bit character sets, with 16 or more bits it can
64 % easily be very inefficient to support the full range.\footnote{In
65 % fact, \LaTeX's current 8-bit support does not go so far as to make
66 % all 8-bit characters into valid input.} Moreover, useful support of
67 % character input by a typesetting system overwhelmingly means finding
68 % an acceptable visual representation of a sequence of characters and
69 % this, for \LaTeX{}, means having available a suitably encoded 8-bit
72 % Unfortunately it is not possible to predict exactly what valid UTF-8
73 % octet sequences will appear in a particular file so it is best to
74 % make all the unsupported but valid sequences produce a reasonably
75 % clear and noticeable error message.
77 % There are two directions from which to approach the question of what
78 % to load. One is to specify the ranges of Unicode characters that will
79 % result in some sensible typesetting; this requires the provider to
80 % ensure that suitable fonts are loaded and that these input characters
81 % generate the correct typesetting via the encodings of those fonts. The
82 % other is to inspect the font encodings to be used and use these to
83 % define which input Unicode characters should be supported.
85 % For Western European languages, at least, going in either direction
86 % leads to many straightforward decisions and a few that are more
87 % subjective. In both cases some of the specifications are \TeX{}
88 % specific whilst most are independent of the particular typesetting
91 % As we have argued elsewhere, \LaTeX{} needs to refer to characters via
92 % `seven-bit-text' names and, so far, these have been chosen by
93 % reference to historical sources such as Plain \TeX{} or Adobe encoding
94 % descriptions. It is unclear whether this ad hoc naming structure should
95 % simply be extended or whether it would be useful to
96 % supplement it with standardised internal Unicode character names such as
97 % one or more of the following:\footnote{Burkhard und Holger Mittelbach
98 % spielen mit mir! Sie haben etwas hier geschrieben.}
101 % \ltxutwochar <4 hex digits>
103 % \ltxuchar {<hex digits>}
106 % \ltxueightchartwo <2 utf8 octets as 8-bit char tokens>
107 % \ltxueightcharthree <3 utf8 octets ...>
108 % \ltxueightcharfour <4 utf8 octets ...>
112 % \subsection{More specific stuff}
114 % In addition to setting up the mechanism for reading UTF-8 characters
115 % and specifying the \LaTeX-level support available, this package
116 % contains support for some default historically expected \TeX-related
117 % characters and some example `Unicode definition files' for standard
123 % This package does not support Unicode combining characters as \TeX{}
124 % is not really equipped to make this possible.
126 % No attempt is made to be useful beyond Latin, and maybe Cyrillic,
127 % for European languages (as of now).
130 % \subsection{Basic operation of the code}
132 % The \texttt{inputenc} package makes the upper 8-bit characters active and
133 % assigns to all of them an error message. It then waits for the
134 % input encoding files to change this set-up. Similarly, whenever
135 % |\inputencoding| is encountered in a document, first the upper
136 % 8-bit characters are set back to produce an error and then the
137 % definitions for the new input encoding are loaded, changing some of the
140 % The 8-bit input encodings currently supported by \texttt{inputenc}
141 % all use declarations such as |\DeclareInputText| and the like to map an
142 % 8-bit number to some \LaTeX{} internal form, e.g.~to |\"a|.
144 % The situation when supporting UTF-8 as the input encoding is
145 % different, however. Here we only have to set up the actions of
146 % those 8-bit numbers that can be the first octet in a UTF-8
147 % representation of a Unicode character. But we cannot simply set
148 % this to some internal \LaTeX{} form since the Unicode character
149 % consists of more than one octet; instead we have to define this
150 % starting octet to parse the right number of further octets that
151 % together form the UTF-8 representation of some Unicode character.
153 % Therefore when switching to \texttt{utf8} within the
154 % \texttt{inputenc} framework the characters with numbers (hex)
155 % from \texttt{"C2} to \texttt{"DF} are defined to parse for a
156 % second octet following, the characters from \texttt{"E0} to
157 % \texttt{"EF} are defined to parse for two more octets and finally
158 % the characters from \texttt{"F0} to \texttt{"F3} are defined to
159 % parse for three additional octets. These additional octets are
160 % always in the range \texttt{"80} to \texttt{"B9}.
162 % Thus, when such a character is encountered in the document (so
163 % long as expansion is not prohibited) a defined number of
164 % additional octets (8-bit characters) are read and from them a
165 % unique control sequence name is immediately constructed.
167 % This control sequence is either defined (good) or undefined
168 % (likely); in the latter case the user gets an error message
169 % saying that this UTF-8 sequence (or, better, Unicode character)
172 % If the control sequence is set up to do something useful then it will
173 % expand to a \LaTeX{} internal form: e.g.~for the utf8 sequence of
174 % two octets \texttt{"C3 "A4} we get |\"a| as the
175 % internal form which then, depending on the font encoding,
176 % eventually resolves to the single glyph `latin-a-umlaut' or to
177 % the composite glyph `latin-a with an umlaut accent'.
179 % These mappings from (UTF-8 encoded) Unicode characters to \LaTeX{}
180 % internal forms are made indirectly. The code below provides a
181 % declaration |\DeclareUnicodeCharacter| which maps Unicode numbers
182 % (as hexadecimal) to \LaTeX{} internal forms.
184 % This mapping needs to be set up only once so it is done at
185 % |\begin{document}| by looking at the list of font encodings that
186 % are loaded by the document and providing mappings related to
187 % those font encodings whenever these are available. Thus at most
188 % only those Unicode characters that can be represented by the glyphs
189 % available in these encodings will be defined.
191 % Technically this is done by loading one file per encoding,
192 % if available, that is supposed to provide the necessary mapping
203 % \subsection{Housekeeping}
205 % The usual introductory bits and pieces:
208 %<utf8>\ProvidesFile{utf8.def}
209 %<test>\ProvidesFile{utf8-test.tex}
210 %<+lcy> \ProvidesFile{lcyenc.dfu}
211 %<+ly1> \ProvidesFile{ly1enc.dfu}
212 %<+oms> \ProvidesFile{omsenc.dfu}
213 %<+ot1> \ProvidesFile{ot1enc.dfu}
214 %<+ot2> \ProvidesFile{ot2enc.dfu}
215 %<+t1> \ProvidesFile{t1enc.dfu}
216 %<+t2a> \ProvidesFile{t2aenc.dfu}
217 %<+t2b> \ProvidesFile{t2benc.dfu}
218 %<+t2c> \ProvidesFile{t2cenc.dfu}
219 %<+ts1> \ProvidesFile{ts1enc.dfu}
220 %<+x2> \ProvidesFile{x2enc.dfu}
221 %<+all> \ProvidesFile{utf8enc.dfu}
222 [2015/09/07 v1.1p UTF-8 support for inputenc]
229 % We restore the |\catcode| of space (which is set to ignore in
230 % \texttt{inputenc}) while reading \texttt{.def} files. Otherwise
231 % we would need to explicitly use |\space| all over the place in
232 % error and log messages.
233 % \changes{v1.1d}{2004/05/08}{Explicitly set catcode of space}
235 \catcode`\ \saved@space@catcode
240 % \subsection{Parsing UTF-8 input}
242 % \begin{macro}{\UTFviii@two@octets}
243 % \begin{macro}{\UTFviii@three@octets}
244 % \begin{macro}{\UTFviii@four@octets}
245 % A UTF-8 char (that is not actually a 7-bit char, i.e.~a single
246 % octet) is parsed as follows: each starting octet is an active
247 % \TeX{} character token; each of these is defined below to be a
248 % macro with one to three arguments nominally (depending on the
249 % starting octet). It calls one of |\UTFviii@two@octets|,
250 % |\UTFviii@three@octets|, or |\UTFviii@four@octets| which then
251 % actually picks up the argument(s).
253 % From the arguments a control sequence with a name of the form
254 % \verb=u8:#1#2...= is constructed where the |#i| ($i>1$) are the
255 % arguments and |#1| is the starting octet (as a \TeX{} character
256 % token). Since some or even all of these characters are active
257 % (when inputenc is loaded) we need to use |\string| when building
260 % The csname thus constructed can of course be undefined but to
261 % avoid producing an unhelpful low-level undefined command error we
262 % pass it to |\UTFviii@defined| which is responsible for producing
263 % a more sensible error message (not yet done!!). If, however, it is
264 % defined we simply execute the thing (which should then expand to
265 % an encoding specific internal \LaTeX{} form).
267 \def\UTFviii@two@octets#1#2{\expandafter
268 \UTFviii@defined\csname u8:#1\string#2\endcsname}
273 \def\UTFviii@three@octets#1#2#3{\expandafter
274 \UTFviii@defined\csname u8:#1\string#2\string#3\endcsname}
279 \def\UTFviii@four@octets#1#2#3#4{\expandafter
280 \UTFviii@defined\csname u8:#1\string#2\string#3\string#4\endcsname}
284 % \begin{macro}{\UTFviii@defined}
285 % This tests whether its argument is different from |\relax|: it
286 % either calls for a sensible error message (not done), or it gets
287 % the |\fi| out of the way (in case the command has arguments) and
290 \def\UTFviii@defined#1{%
293 % The endline character has a special definition within the
294 % inputenc package (it is gobbling spaces). For this reason we
295 % can't produce multiline strings without some precaution.
296 % \changes{v1.1b}{2004/02/09}{No newlines allowed in error messages}
297 % \changes{v1.1g}{2005/09/27}{Real spaces do not show up so use \cs{space}}
298 % \changes{v1.1o}{2015/08/28}{Show Unicode number of character in hex}
300 \PackageError{inputenc}{Unicode\space char\space\expandafter
301 \UTFviii@splitcsname\string#1\relax
303 not\space set\space up\space
304 for\space use\space with\space LaTeX}\@eha
312 % \begin{macro}{\UTFviii@loop}
313 % This wonderful bit of code from Dr Carlisle defines the starting
314 % octets to call |\UTFviii@two@octets| etc as appropriate. The starting
315 % octet itself is passed directly as the first argument, the others
316 % are picked up later en route.
318 % The |\UTFviii@loop| loops through the numbers starting at
319 % |\count@| and ending at |\@tempcnta|${} - 1$, each time executing
320 % the code in |\UTFviii@tmp|.
322 % All this is done in a group so that temporary catcode changes
323 % etc.~vanish after everything is set up.
325 % It may be a good idea to add code to deal with `illegal utf8 octets':
326 % at present these will be handled by whatever code was in use for 8-bit
327 % input before this code is executed.
338 \uppercase\expandafter{\UTFviii@tmp}%
340 \ifnum\count@<\@tempcnta
341 \expandafter\UTFviii@loop
345 % Setting up 2-byte UTF-8:
349 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\string~}}
352 % Setting up 3-byte UTF-8:
356 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\string~}}
360 % Setting up 4-byte UTF-8:
364 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\string~}}
370 % For this case we must disable the warning generated by
371 % \texttt{inputenc} if it doesn't see any new |\DeclareInputText|
378 % If this file (\texttt{utf8.def}) is not being read while setting
379 % up \texttt{inputenc}, i.e.~in the preamble, but when
380 % |\inputencoding| is called somewhere within the document, we do not
381 % need to input the specific Unicode mappings again. We therefore
382 % stop reading the file at this point.
384 \ifx\@begindocumenthook\@undefined
387 % The |\fi| must be on the same line as |\endinput| or else it will
394 % \subsection{Mapping Unicode codes to \LaTeX{} internal forms}
397 % \begin{macro}{\DeclareUnicodeCharacter}
398 % The |\DeclareUnicodeCharacter| declaration defines a mapping from
399 % a Unicode character code point to a \LaTeX{} internal form. The first
400 % argument is the Unicode number as hexadecimal digits and the second is
401 % the actual \LaTeX{} internal form.
403 % We start by making sure that some characters have the right
404 % |\catcode| when they are used in the definitions below.
417 \gdef\DeclareUnicodeCharacter#1#2{%
419 \wlog{ \space\space defining Unicode char U+#1 (decimal \the\count@)}%
422 % Next we do the parsing of the number stored in |\count@| and assign the
423 % result to |\UTFviii@tmp|. Actually all this could be done in-line,
424 % the macro |\parse@XML@charref| is only there to extend this code
425 % to parsing Unicode numbers in other contexts one day (perhaps).
430 % Here is an example of what is happening, for the pair \texttt{"C2 "A3}
431 % (which is the utf8 represenation for the character \textsterling{}).
432 % After |\parse@XML@charref| we have, stored in |\UTFviii@tmp|, a
433 % single command with two character tokens as arguments:
435 % [$t_{C2}$ and $t_{A3}$ are the characters corresponding to these
437 % |\UTFviii@two@octets| $t_{\rm C2}t_{\rm A3}$
439 % what we actually need to produce is a definition of the form
441 % |\def\u8:|$t_{\rm C2}$$t_{\rm A3}$ |{|\textit{\LaTeX{} internal form}|}|\,.
443 % So here we temporarily redefine the prefix commands
444 % |\UTFviii@two@octets|, etc.~to
445 % generate the csname that we wish to define> the |\string|s are
446 % added in case these tokens are still active.
448 \def\UTFviii@two@octets##1##2{\csname u8:##1\string##2\endcsname}%
449 \def\UTFviii@three@octets##1##2##3{\csname u8:##1%
450 \string##2\string##3\endcsname}%
451 \def\UTFviii@four@octets##1##2##3##4{\csname u8:##1%
452 \string##2\string##3\string##4\endcsname}%
454 % Now we simply:-) need to use the right number of |\expandafter|s to
455 % finally construct the definition: expanding |\UTFviii@tmp| once to get
456 % its contents, a second time to replace the prefix command by its
457 % |\csname| expansion, and a third time to turn the expansion into
458 % a csname after which the |\gdef| finally gets applied.
459 % We add an irrelevant |\IeC| and braces around the definition, in
460 % order to avoid any space after the command being gobbled up
461 % when the text is written out to an auxiliary file (see
462 % \texttt{inputenc} for further details
464 \expandafter\expandafter\expandafter
465 \expandafter\expandafter\expandafter
467 \gdef\UTFviii@tmp{\IeC{#2}}%
474 % \begin{macro}{\parse@XML@charref}
475 % This macro parses a Unicode number (decimal) and returns its
476 % UTF-8 representation as a sequence of non-active \TeX{} character
478 % original code it had two arguments delimited by \texttt{;} here,
479 % however, we supply the Unicode number implicitly.
481 \gdef\parse@XML@charref{%
483 % We need to keep a few things local, mainly the |\uccode|'s that
484 % are set up below. However, the group originally used here is
485 % actually unnecessary since we call this macro only within another
486 % group; but it will be important to restore the group if this
487 % macro gets used for other purposes.
491 % The original code from David supported the convention that a
492 % Unicode slot number could be given either as a decimal or as a
493 % hexadecimal (by starting with \texttt{x}). We do not do this so
494 % this code is also removed. This could be reactivated if one
495 % wants to support document commands that accept Unicode numbers
496 % (but then the first case needs to be changed from an error
497 % message back to something more useful again).
499 % \uppercase{\count@\if x\noexpand#1"\else#1\fi#2}\relax
501 % As |\count@| already contains the right value we make
502 % |\parse@XML@charref| work without arguments.
503 % \changes{v1.1g}{2005/09/27}{Real spaces do not show up so use \cs{space}}
505 \ifnum\count@<"A0\relax
506 \PackageError{inputenc}{Cannot\space define\space Unicode\space
507 char\space value\space <\space 00A0}\@eha
509 % Do not ask us to provide an explanation for the code below, it is
510 % borrowed straight from \texttt{xmltex} by David and we trust him
511 % totally (and we are too lazy to reread the Unicode book to see if
512 % this is the correct algorithm).\footnote{We were hoping to also
513 % find in his work the \TeX{} code for going the other way: from
514 % UTF-8 octets to Unicode slot number, but no luck!
515 % This has now been added as \cs{decode@UTFviii}}
517 \else\ifnum\count@<"800\relax
519 \parse@UTFviii@b C\UTFviii@two@octets.,%
520 \else\ifnum\count@<"10000\relax
523 \parse@UTFviii@b E\UTFviii@three@octets.{,;}%
528 \parse@UTFviii@b F\UTFviii@four@octets.{!,;}%
537 % \begin{macro}{\parse@UTFviii@a}
538 % \ldots so somebody else can document this part :-) \ldots~David?:-))))!
539 % \changes{v1.1b}{2004/02/09}{Space in the wrong place \cs{count @64}}
541 \gdef\parse@UTFviii@a#1{%
546 \advance\@tempcnta-\count@
547 \advance\@tempcnta 128
553 % \begin{macro}{\parse@UTFviii@b}
556 \gdef\parse@UTFviii@b#1#2#3#4{%
557 \advance\count@ "#10\relax
559 \uppercase{\gdef\UTFviii@tmp{#2#3#4}}}
563 % \begin{macro}{\decode@UTFviii}
564 % \changes{v1.1o}{2015/08/28}{Macro added}
565 % In the reverse direction, take a sequence of octects(bytes)
566 % representing a character in UTF-8 and construct the Unicode number.
567 % The sequence is terminated by |\relax|.
569 % In this version, if the sequence is not valid UTF-8 you probably
570 % get a low level arithmetic error from |\numexpr| or stray characters
571 % at the end. Getting a better error message would be somewhat expensive.
572 % As the main use is for reporting characters in messages, this is done
573 % just using expansion, so |\numexpr| is used, A stub returning 0 is defined
574 % if |\numexpr| is not available.
576 \ifx\numexpr\@undefined
580 \gdef\decode@UTFviii#1{0}
587 % If the input is malformed UTF-8 there may not be enough closing ) so
588 % add 5 so there are always some remaining then cleanup and remove
589 % any remaining ones at the end. This avoids |\numexpr| parse errors
590 % while outputting a package error.
592 \gdef\decode@UTFviii#1\relax{%
593 \expandafter\UTFviii@cleanup
594 \the\numexpr\dec@de@UTFviii#1\relax)))))\@empty}
598 \gdef\UTFviii@cleanup#1)#2\@empty{#1}
602 \gdef\dec@de@UTFviii#1{%
622 \expandafter\dec@de@UTFviii
631 % \begin{macro}{\UTFviii@hexnumber}
632 % \changes{v1.1o}{2015/08/28}{Macro added}
633 % Convert a number to a sequence of uppercase hex digits.
634 % If |\numexpr| is not available, it returns its argument unchanged.
636 \ifx\numexpr\@undefined
639 \global\let\UTFviii@hexnumber\@firstofone
640 \global\UTFviii@hexdigit\hexnumber@
646 \gdef\UTFviii@hexnumber#1{%
648 \expandafter\UTFviii@hexnumber\expandafter{\the\numexpr(#1-8)/16\relax}%
650 \UTFviii@hexdigit{\numexpr#1\ifnum#1>0-((#1-8)/16)*16\fi\relax}%
654 % Almost but not quite |\hexnumber@|.
656 \gdef\UTFviii@hexdigit#1{\ifcase\numexpr#1\relax
657 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or
658 A\or B\or C\or D\or E\or F\fi}
666 % \begin{macro}{\UTFviii@splitcsname}
667 % \changes{v1.1o}{2015/08/28}{Macro added}
668 % Split a csname representing a unicode character and return
669 % the character and (if |\numexpr| is defined) the unicode number in hex.
671 \ifx\numexpr\@undefined
672 \gdef\UTFviii@splitcsname#1:#2\relax{#2}}
674 \gdef\UTFviii@splitcsname#1:#2\relax{%
676 % Need to pre-expand the argument to ensure cleanup in case of mal-formed UTF-8.
678 #2 (U+\expandafter\UTFviii@hexnumber\expandafter{%
679 \the\numexpr\decode@UTFviii#2\relax})
690 \@onlypreamble\DeclareUnicodeCharacter
692 % These are preamble only as long as we don't support Unicode
693 % charrefs in documents.
695 \@onlypreamble\parse@XML@charref
696 \@onlypreamble\parse@UTFviii@a
697 \@onlypreamble\parse@UTFviii@b
701 % \subsection{Loading Unicode mappings at begin document}
703 % The original plan was to set up the UTF-8 support at
704 % |\begin{document}|; but then any text characters used in the preamble
705 % (as people do even though advised against it) would fail in one way or
707 % So the implementation was changed and the Unicode definition files
708 % for already defined encodings are loaded here.
710 % We loop through all defined font encodings
711 % (stored in |\cdp@list|) and for each load a file
712 % \textit{name}\texttt{enc.dfu} if it exist. That file is then
713 % supposed to contain |\DeclareUnicodeCharacter| declarations.
716 \def\cdp@elt#1#2#3#4{%
717 \wlog{Now handling font encoding #1 ...}%
719 \InputIfFileExists{#1enc.dfu}}%
720 {\wlog{... processing UTF-8 mapping file for font %
723 % \changes{v1.1m}{2008/04/05}{Ensure we don't lose spaces in the log}
724 % The previous line is written to the log with the newline char being
725 % ignored (thus not producing a space). Therefore either everything has to
726 % be on a single input line or some special care must be taken. From this
727 % point on we ignore spaces again, i.e., while we are reading the
728 % \texttt{.dfu} file. The |\endgroup| below will restore it again.
729 % \changes{v1.1d}{2004/05/08}{Explicitly set catcode of space}
730 % \changes{v1.1g}{2005/09/27}{We lost the ``false'' case}
733 {\wlog{... no UTF-8 mapping file for font encoding #1}}%
738 % However, we don't know if there are font encodings still to be
739 % loaded (either with \texttt{fontenc} or directly with |\input| by
740 % some some package). Font encoding files are loaded only if the
741 % corresponding encoding has not been loaded yet, and they always
742 % begin with |\DeclareFontEncoding|. We now redefine the internal
743 % kernel version of the latter to load the Unicode file if available.
746 \def\DeclareFontEncoding@#1#2#3{%
748 \ifx\csname T@#1\endcsname\relax
749 \def\cdp@elt{\noexpand\cdp@elt}%
750 \xdef\cdp@list{\cdp@list\cdp@elt{#1}%
751 {\default@family}{\default@series}%
753 \expandafter\let\csname#1-cmd\endcsname\@changed@cmd
755 \wlog{Now handling font encoding #1 ...}%
757 \InputIfFileExists{#1enc.dfu}}%
758 {\wlog{... processing UTF-8 mapping file for font %
760 {\wlog{... no UTF-8 mapping file for font encoding #1}}%
763 \@font@info{Redeclaring font encoding #1}%
765 \global\@namedef{T@#1}{#2}%
766 \global\@namedef{M@#1}{\default@M#3}%
767 \xdef\LastDeclaredEncoding{#1}%
774 % \section{Mapping characters ---\newline based on font (glyph) encodings}
776 % This section is a first attempt to provide Unicode definitions for
777 % characters whose standard glyphs are currently provided by the
778 % standard \LaTeX{} font-encodings |T1|, |OT1|, etc. They are by
779 % no means completed and need checking.
781 % For example, one should check the already existing input encodings
782 % for glyphs that may in fact be available and required,
783 % e.g.~\texttt{latin4} has a number of glyphs with the |\=|
784 % accent. Since the |T1| encoding does not provide such glyphs,
785 % these characters are not listed below (yet).
787 % The list below was generated by looking at the current \LaTeX{} font
788 % encoding files, e.g., \texttt{t1enc.def} and using the work by
789 % Sebastian Rahtz (in \texttt{ucharacters.sty}) with a few
790 % modifications. In combinations such as |\^\i| the preferred form
791 % is that and not |\^i|.
793 % This list has been built from several sources, obviously including
794 % the Unicode Standard itself. These sources include Passive \TeX{} by
795 % Sebastian Rahtz, the \texttt{unicode}
796 % package by Dominique P. G. Unruh (mainly for Latin encodings) and
797 % \texttt{text4ht} by Eitan Gurari (for Cyrillic ones).
799 % Note that it strictly follows the Mittelbach principles for
800 % input character encodings: thus it offers no support for using utf8
801 % representations of math symbols such as $\times$ or $\div$ (in math mode).
804 % \subsection{About the table itself}
806 % In addition to generating individual files, the table below is, at present,
807 % a one-one (we think) partial relationship between the (ill-defined) set
808 % of LICRs and the Unicode slots "0080 to "FFFF. At present these entries
809 % are used only to define a collection of partial mappings from Unicode
810 % slots to LICRs; each of these mappings becomes full if we add an exception
811 % value (`not defined') to the set of LICRs.
813 % It is probably not essential for the relationship in the full table to be
814 % one-one; this raises questions such as: the exact role of LICRs;
815 % the formal relationships on the set of LICRs; the (non-mathematical)
816 % relationship between
817 % LICRs and Unicode (which has its own somewhat fuzzy equivalences);
818 % and ultimately what a character is and what a character representation
821 % It is unclear the extent to which entries in this table should
822 % resemble the closely related ones in the 8-bit \texttt{inputenc} files.
823 % The Unicode standard claims that the first 256 slots `are' ASCII and
826 % Of course, \TeX{} itself typically does not treat even many perfectly
827 % `normal text' 7-bit slots as text characters, so it is unclear
828 % whether \LaTeX{} should even attempt to deal in any consistent way with
829 % those Unicode slots that are not definitive text characters.
832 % \subsection{The mapping table}
834 % Note that the first argument must be a hex-digit number greater
835 % than \texttt{00BF} and at most \texttt{10FFFF}.
837 % There are few notes about inconsistencies etc at the end of the table.
839 % \changes{v1.1o}{2015/08/28}{Add U+00A0 and U+00AD}
841 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00A0}{\nobreakspace}
842 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00A1}{\textexclamdown}
843 %<all,ts1,ly1>\DeclareUnicodeCharacter{00A2}{\textcent}
844 %<all,ts1,t1,ot1,ly1>\DeclareUnicodeCharacter{00A3}{\textsterling}
845 %<all,x2,ts1,t2c,t2b,t2a,ly1,lcy>\DeclareUnicodeCharacter{00A4}{\textcurrency}
846 %<all,ts1,ly1>\DeclareUnicodeCharacter{00A5}{\textyen}
847 %<all,ts1,ly1>\DeclareUnicodeCharacter{00A6}{\textbrokenbar}
848 %<all,x2,ts1,t2c,t2b,t2a,oms,ly1>\DeclareUnicodeCharacter{00A7}{\textsection}
849 %<all,ts1>\DeclareUnicodeCharacter{00A8}{\textasciidieresis}
850 %<all,ts1,utf8>\DeclareUnicodeCharacter{00A9}{\textcopyright}
851 %<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{00AA}{\textordfeminine}
852 %<*all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
853 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
854 %</all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
855 %<all,ts1>\DeclareUnicodeCharacter{00AC}{\textlnot}
856 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00AD}{\-}
857 %<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{00AE}{\textregistered}
858 %<all,ts1>\DeclareUnicodeCharacter{00AF}{\textasciimacron}
859 %<all,ts1,ly1>\DeclareUnicodeCharacter{00B0}{\textdegree}
860 %<all,ts1>\DeclareUnicodeCharacter{00B1}{\textpm}
861 %<all,ts1>\DeclareUnicodeCharacter{00B2}{\texttwosuperior}
862 %<all,ts1>\DeclareUnicodeCharacter{00B3}{\textthreesuperior}
863 %<all,ts1>\DeclareUnicodeCharacter{00B4}{\textasciiacute}
864 %<all,ts1,ly1>\DeclareUnicodeCharacter{00B5}{\textmu} % micro sign
865 %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{00B6}{\textparagraph}
866 %<all,oms,ts1,ly1>\DeclareUnicodeCharacter{00B7}{\textperiodcentered}
867 %<all,ot1>\DeclareUnicodeCharacter{00B8}{\c\ }
868 %<all,ts1>\DeclareUnicodeCharacter{00B9}{\textonesuperior}
869 %<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{00BA}{\textordmasculine}
870 %<*all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
871 \DeclareUnicodeCharacter{00BB}{\guillemotright}
872 %</all,x2,t2c,t2b,t2a,t1,ot2,ly1,lcy>
873 %<all,ts1,ly1>\DeclareUnicodeCharacter{00BC}{\textonequarter}
874 %<all,ts1,ly1>\DeclareUnicodeCharacter{00BD}{\textonehalf}
875 %<all,ts1,ly1>\DeclareUnicodeCharacter{00BE}{\textthreequarters}
876 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00BF}{\textquestiondown}
877 %<all,t1,ly1>\DeclareUnicodeCharacter{00C0}{\@tabacckludge`A}
878 %<all,t1,ly1>\DeclareUnicodeCharacter{00C1}{\@tabacckludge'A}
879 %<all,t1,ly1>\DeclareUnicodeCharacter{00C2}{\^A}
880 %<all,t1,ly1>\DeclareUnicodeCharacter{00C3}{\~A}
881 %<all,t1,ly1>\DeclareUnicodeCharacter{00C4}{\"A}
882 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00C5}{\r A}
883 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00C6}{\AE}
884 %<all,t1,ly1>\DeclareUnicodeCharacter{00C7}{\c C}
885 %<all,t1,ly1>\DeclareUnicodeCharacter{00C8}{\@tabacckludge`E}
886 %<all,t1,ly1>\DeclareUnicodeCharacter{00C9}{\@tabacckludge'E}
887 %<all,t1,ly1>\DeclareUnicodeCharacter{00CA}{\^E}
888 %<all,t1,ly1>\DeclareUnicodeCharacter{00CB}{\"E}
889 %<all,t1,ly1>\DeclareUnicodeCharacter{00CC}{\@tabacckludge`I}
890 %<all,t1,ly1>\DeclareUnicodeCharacter{00CD}{\@tabacckludge'I}
891 %<all,t1,ly1>\DeclareUnicodeCharacter{00CE}{\^I}
892 %<all,t1,ly1>\DeclareUnicodeCharacter{00CF}{\"I}
893 %<all,t1,ly1>\DeclareUnicodeCharacter{00D0}{\DH}
894 %<all,t1,ly1>\DeclareUnicodeCharacter{00D1}{\~N}
895 %<all,t1,ly1>\DeclareUnicodeCharacter{00D2}{\@tabacckludge`O}
896 %<all,t1,ly1>\DeclareUnicodeCharacter{00D3}{\@tabacckludge'O}
897 %<all,t1,ly1>\DeclareUnicodeCharacter{00D4}{\^O}
898 %<all,t1,ly1>\DeclareUnicodeCharacter{00D5}{\~O}
899 %<all,t1,ly1>\DeclareUnicodeCharacter{00D6}{\"O}
900 %<all,ts1>\DeclareUnicodeCharacter{00D7}{\texttimes}
901 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00D8}{\O}
902 %<all,t1,ly1>\DeclareUnicodeCharacter{00D9}{\@tabacckludge`U}
903 %<all,t1,ly1>\DeclareUnicodeCharacter{00DA}{\@tabacckludge'U}
904 %<all,t1,ly1>\DeclareUnicodeCharacter{00DB}{\^U}
905 %<all,t1,ly1>\DeclareUnicodeCharacter{00DC}{\"U}
906 %<all,t1,ly1>\DeclareUnicodeCharacter{00DD}{\@tabacckludge'Y}
907 %<all,t1,ly1>\DeclareUnicodeCharacter{00DE}{\TH}
908 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00DF}{\ss}
909 %<all,t1,ly1>\DeclareUnicodeCharacter{00E0}{\@tabacckludge`a}
910 %<all,t1,ly1>\DeclareUnicodeCharacter{00E1}{\@tabacckludge'a}
911 %<all,t1,ly1>\DeclareUnicodeCharacter{00E2}{\^a}
912 %<all,t1,ly1>\DeclareUnicodeCharacter{00E3}{\~a}
913 %<all,t1,ly1>\DeclareUnicodeCharacter{00E4}{\"a}
914 %<all,t1,ly1>\DeclareUnicodeCharacter{00E5}{\r a}
915 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00E6}{\ae}
916 %<all,t1,ly1>\DeclareUnicodeCharacter{00E7}{\c c}
917 %<all,t1,ly1>\DeclareUnicodeCharacter{00E8}{\@tabacckludge`e}
918 %<all,t1,ly1>\DeclareUnicodeCharacter{00E9}{\@tabacckludge'e}
919 %<all,t1,ly1>\DeclareUnicodeCharacter{00EA}{\^e}
920 %<all,t1,ly1>\DeclareUnicodeCharacter{00EB}{\"e}
921 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00EC}{\@tabacckludge`\i}
922 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00ED}{\@tabacckludge'\i}
923 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00EE}{\^\i}
924 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{00EF}{\"\i}
925 %<all,t1,ly1>\DeclareUnicodeCharacter{00F0}{\dh}
926 %<all,t1,ly1>\DeclareUnicodeCharacter{00F1}{\~n}
927 %<all,t1,ly1>\DeclareUnicodeCharacter{00F2}{\@tabacckludge`o}
928 %<all,t1,ly1>\DeclareUnicodeCharacter{00F3}{\@tabacckludge'o}
929 %<all,t1,ly1>\DeclareUnicodeCharacter{00F4}{\^o}
930 %<all,t1,ly1>\DeclareUnicodeCharacter{00F5}{\~o}
931 %<all,t1,ly1>\DeclareUnicodeCharacter{00F6}{\"o}
932 %<all,ts1>\DeclareUnicodeCharacter{00F7}{\textdiv}
933 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{00F8}{\o}
934 %<all,t1,ly1>\DeclareUnicodeCharacter{00F9}{\@tabacckludge`u}
935 %<all,t1,ly1>\DeclareUnicodeCharacter{00FA}{\@tabacckludge'u}
936 %<all,t1,ly1>\DeclareUnicodeCharacter{00FB}{\^u}
937 %<all,t1,ly1>\DeclareUnicodeCharacter{00FC}{\"u}
938 %<all,t1,ly1>\DeclareUnicodeCharacter{00FD}{\@tabacckludge'y}
939 %<all,t1,ly1>\DeclareUnicodeCharacter{00FE}{\th}
940 %<all,t1,ly1>\DeclareUnicodeCharacter{00FF}{\"y}
941 %<all,t1>\DeclareUnicodeCharacter{0102}{\u A}
942 %<all,t1>\DeclareUnicodeCharacter{0103}{\u a}
943 %<all,t1>\DeclareUnicodeCharacter{0104}{\k A}
944 %<all,t1>\DeclareUnicodeCharacter{0105}{\k a}
945 %<all,t1>\DeclareUnicodeCharacter{0106}{\@tabacckludge'C}
946 %<all,t1>\DeclareUnicodeCharacter{0107}{\@tabacckludge'c}
947 %<all,t1>\DeclareUnicodeCharacter{010C}{\v C}
948 %<all,t1>\DeclareUnicodeCharacter{010D}{\v c}
949 %<all,t1>\DeclareUnicodeCharacter{010E}{\v D}
950 %<all,t1>\DeclareUnicodeCharacter{010F}{\v d}
951 %<all,t1>\DeclareUnicodeCharacter{0110}{\DJ}
952 %<all,t1>\DeclareUnicodeCharacter{0111}{\dj}
953 %<all,t1>\DeclareUnicodeCharacter{0118}{\k E}
954 %<all,t1>\DeclareUnicodeCharacter{0119}{\k e}
955 %<all,t1>\DeclareUnicodeCharacter{011A}{\v E}
956 %<all,t1>\DeclareUnicodeCharacter{011B}{\v e}
957 %<all,t1>\DeclareUnicodeCharacter{011E}{\u G}
958 %<all,t1>\DeclareUnicodeCharacter{011F}{\u g}
959 %<all,t1>\DeclareUnicodeCharacter{0130}{\.I}
960 %<all,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>\DeclareUnicodeCharacter{0131}{\i}
961 %<all,t1>\DeclareUnicodeCharacter{0132}{\IJ}
962 %<all,t1>\DeclareUnicodeCharacter{0133}{\ij}
963 %<all,t1>\DeclareUnicodeCharacter{0139}{\@tabacckludge'L}
964 %<all,t1>\DeclareUnicodeCharacter{013A}{\@tabacckludge'l}
965 %<all,t1>\DeclareUnicodeCharacter{013D}{\v L}
966 %<all,t1>\DeclareUnicodeCharacter{013E}{\v l}
967 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0141}{\L}
968 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0142}{\l}
969 %<all,t1>\DeclareUnicodeCharacter{0143}{\@tabacckludge'N}
970 %<all,t1>\DeclareUnicodeCharacter{0144}{\@tabacckludge'n}
971 %<all,t1>\DeclareUnicodeCharacter{0147}{\v N}
972 %<all,t1>\DeclareUnicodeCharacter{0148}{\v n}
973 %<all,t1>\DeclareUnicodeCharacter{014A}{\NG}
974 %<all,t1>\DeclareUnicodeCharacter{014B}{\ng}
975 %<all,t1>\DeclareUnicodeCharacter{0150}{\H O}
976 %<all,t1>\DeclareUnicodeCharacter{0151}{\H o}
977 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{0152}{\OE}
978 %<all,t1,ot1,ly1,lcy>\DeclareUnicodeCharacter{0153}{\oe}
979 %<all,t1>\DeclareUnicodeCharacter{0154}{\@tabacckludge'R}
980 %<all,t1>\DeclareUnicodeCharacter{0155}{\@tabacckludge'r}
981 %<all,t1>\DeclareUnicodeCharacter{0158}{\v R}
982 %<all,t1>\DeclareUnicodeCharacter{0159}{\v r}
983 %<all,t1>\DeclareUnicodeCharacter{015A}{\@tabacckludge'S}
984 %<all,t1>\DeclareUnicodeCharacter{015B}{\@tabacckludge's}
985 %<all,t1>\DeclareUnicodeCharacter{015E}{\c S}
986 %<all,t1>\DeclareUnicodeCharacter{015F}{\c s}
987 %<all,t1,ly1>\DeclareUnicodeCharacter{0160}{\v S}
988 %<all,t1,ly1>\DeclareUnicodeCharacter{0161}{\v s}
989 %<all,t1>\DeclareUnicodeCharacter{0162}{\c T}
990 %<all,t1>\DeclareUnicodeCharacter{0163}{\c t}
991 %<all,t1>\DeclareUnicodeCharacter{0164}{\v T}
992 %<all,t1>\DeclareUnicodeCharacter{0165}{\v t}
993 %<all,t1>\DeclareUnicodeCharacter{016E}{\r U}
994 %<all,t1>\DeclareUnicodeCharacter{016F}{\r u}
995 %<all,t1>\DeclareUnicodeCharacter{0170}{\H U}
996 %<all,t1>\DeclareUnicodeCharacter{0171}{\H u}
999 % \changes{v1.1p}{2015/09/07}{Welsh circumflex combinations}
1001 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0174}{\^W}
1002 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0175}{\^w}
1003 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0176}{\^Y}
1004 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0177}{\^y}
1005 %<all,t1,ly1>\DeclareUnicodeCharacter{0178}{\"Y}
1006 %<all,t1>\DeclareUnicodeCharacter{0179}{\@tabacckludge'Z}
1007 %<all,t1>\DeclareUnicodeCharacter{017A}{\@tabacckludge'z}
1008 %<all,t1>\DeclareUnicodeCharacter{017B}{\.Z}
1009 %<all,t1>\DeclareUnicodeCharacter{017C}{\.z}
1010 %<all,t1,ly1>\DeclareUnicodeCharacter{017D}{\v Z}
1011 %<all,t1,ly1>\DeclareUnicodeCharacter{017E}{\v z}
1012 %<all,ts1,ly1>\DeclareUnicodeCharacter{0192}{\textflorin}
1015 % \changes{v1.1o}{2015/08/28}{comma accent latex/4414}
1017 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0218}{\textcommabelow S}
1018 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{0219}{\textcommabelow s}
1019 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{021A}{\textcommabelow T}
1020 %<all,t1,ot1,ly1>\DeclareUnicodeCharacter{021B}{\textcommabelow t}
1024 %<all,ly1,utf8>\DeclareUnicodeCharacter{02C6}{\textasciicircum}
1025 %<all,ts1>\DeclareUnicodeCharacter{02C7}{\textasciicaron}
1026 %<all,ly1,utf8>\DeclareUnicodeCharacter{02DC}{\textasciitilde}
1027 %<all,ts1>\DeclareUnicodeCharacter{02D8}{\textasciibreve}
1028 %<all,ts1>\DeclareUnicodeCharacter{02DD}{\textacutedbl}
1030 % The Cyrillic code points have been recently checked (2007) and extended
1031 % and corrected by Matthias Noe (\verb=a9931078@unet.univie.ac.at=) --- thanks.
1032 % \changes{v1.1j}{2007/11/09}{Added a few new unicode decls in cyrillic (pr/3988)}
1033 % \changes{v1.1k}{2007/11/11}{Added and further unicode decls in cyrillic}
1034 % \changes{v1.1n}{2015/06/27}{correct accent http://tex.stackexchange.com/q/252521}
1036 %<*all,x2,t2c,t2b,t2a,ot2,lcy>
1037 \DeclareUnicodeCharacter{0400}{\@tabacckludge`\CYRE}
1038 %</all,x2,t2c,t2b,t2a,ot2,lcy>
1039 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{0401}{\CYRYO}
1040 %<all,x2,t2a,ot2>\DeclareUnicodeCharacter{0402}{\CYRDJE}
1041 %<*all,x2,t2c,t2b,t2a,ot2,lcy>
1042 \DeclareUnicodeCharacter{0403}{\@tabacckludge'\CYRG}
1043 %</all,x2,t2c,t2b,t2a,ot2,lcy>
1044 %<all,x2,t2a,ot2,lcy>\DeclareUnicodeCharacter{0404}{\CYRIE}
1045 %<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0405}{\CYRDZE}
1046 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{0406}{\CYRII}
1047 %<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0407}{\CYRYI}
1048 %<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0408}{\CYRJE}
1049 %<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{0409}{\CYRLJE}
1050 %<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{040A}{\CYRNJE}
1051 %<all,x2,t2a,ot2>\DeclareUnicodeCharacter{040B}{\CYRTSHE}
1052 %<*all,x2,t2c,t2b,t2a,ot2,lcy>
1053 \DeclareUnicodeCharacter{040C}{\@tabacckludge'\CYRK}
1054 \DeclareUnicodeCharacter{040D}{\@tabacckludge`\CYRI}
1055 %</all,x2,t2c,t2b,t2a,ot2,lcy>
1056 %<all,x2,t2b,t2a,lcy>\DeclareUnicodeCharacter{040E}{\CYRUSHRT}
1057 %<all,x2,t2c,t2a,ot2>\DeclareUnicodeCharacter{040F}{\CYRDZHE}
1058 %<*all,x2,t2c,t2b,t2a,ot2,lcy>
1059 \DeclareUnicodeCharacter{0410}{\CYRA}
1060 \DeclareUnicodeCharacter{0411}{\CYRB}
1061 \DeclareUnicodeCharacter{0412}{\CYRV}
1062 \DeclareUnicodeCharacter{0413}{\CYRG}
1063 \DeclareUnicodeCharacter{0414}{\CYRD}
1064 \DeclareUnicodeCharacter{0415}{\CYRE}
1065 \DeclareUnicodeCharacter{0416}{\CYRZH}
1066 \DeclareUnicodeCharacter{0417}{\CYRZ}
1067 \DeclareUnicodeCharacter{0418}{\CYRI}
1068 \DeclareUnicodeCharacter{0419}{\CYRISHRT}
1069 \DeclareUnicodeCharacter{041A}{\CYRK}
1070 \DeclareUnicodeCharacter{041B}{\CYRL}
1071 \DeclareUnicodeCharacter{041C}{\CYRM}
1072 \DeclareUnicodeCharacter{041D}{\CYRN}
1073 \DeclareUnicodeCharacter{041E}{\CYRO}
1074 \DeclareUnicodeCharacter{041F}{\CYRP}
1075 \DeclareUnicodeCharacter{0420}{\CYRR}
1076 \DeclareUnicodeCharacter{0421}{\CYRS}
1077 \DeclareUnicodeCharacter{0422}{\CYRT}
1078 \DeclareUnicodeCharacter{0423}{\CYRU}
1079 \DeclareUnicodeCharacter{0424}{\CYRF}
1080 \DeclareUnicodeCharacter{0425}{\CYRH}
1081 \DeclareUnicodeCharacter{0426}{\CYRC}
1082 \DeclareUnicodeCharacter{0427}{\CYRCH}
1083 \DeclareUnicodeCharacter{0428}{\CYRSH}
1084 \DeclareUnicodeCharacter{0429}{\CYRSHCH}
1085 \DeclareUnicodeCharacter{042A}{\CYRHRDSN}
1086 \DeclareUnicodeCharacter{042B}{\CYRERY}
1087 \DeclareUnicodeCharacter{042C}{\CYRSFTSN}
1088 \DeclareUnicodeCharacter{042D}{\CYREREV}
1089 \DeclareUnicodeCharacter{042E}{\CYRYU}
1090 \DeclareUnicodeCharacter{042F}{\CYRYA}
1091 \DeclareUnicodeCharacter{0430}{\cyra}
1092 \DeclareUnicodeCharacter{0431}{\cyrb}
1093 \DeclareUnicodeCharacter{0432}{\cyrv}
1094 \DeclareUnicodeCharacter{0433}{\cyrg}
1095 \DeclareUnicodeCharacter{0434}{\cyrd}
1096 \DeclareUnicodeCharacter{0435}{\cyre}
1097 \DeclareUnicodeCharacter{0436}{\cyrzh}
1098 \DeclareUnicodeCharacter{0437}{\cyrz}
1099 \DeclareUnicodeCharacter{0438}{\cyri}
1100 \DeclareUnicodeCharacter{0439}{\cyrishrt}
1101 \DeclareUnicodeCharacter{043A}{\cyrk}
1102 \DeclareUnicodeCharacter{043B}{\cyrl}
1103 \DeclareUnicodeCharacter{043C}{\cyrm}
1104 \DeclareUnicodeCharacter{043D}{\cyrn}
1105 \DeclareUnicodeCharacter{043E}{\cyro}
1106 \DeclareUnicodeCharacter{043F}{\cyrp}
1107 \DeclareUnicodeCharacter{0440}{\cyrr}
1108 \DeclareUnicodeCharacter{0441}{\cyrs}
1109 \DeclareUnicodeCharacter{0442}{\cyrt}
1110 \DeclareUnicodeCharacter{0443}{\cyru}
1111 \DeclareUnicodeCharacter{0444}{\cyrf}
1112 \DeclareUnicodeCharacter{0445}{\cyrh}
1113 \DeclareUnicodeCharacter{0446}{\cyrc}
1114 \DeclareUnicodeCharacter{0447}{\cyrch}
1115 \DeclareUnicodeCharacter{0448}{\cyrsh}
1116 \DeclareUnicodeCharacter{0449}{\cyrshch}
1117 \DeclareUnicodeCharacter{044A}{\cyrhrdsn}
1118 \DeclareUnicodeCharacter{044B}{\cyrery}
1119 \DeclareUnicodeCharacter{044C}{\cyrsftsn}
1120 \DeclareUnicodeCharacter{044D}{\cyrerev}
1121 \DeclareUnicodeCharacter{044E}{\cyryu}
1122 \DeclareUnicodeCharacter{044F}{\cyrya}
1123 \DeclareUnicodeCharacter{0450}{\@tabacckludge`\cyre}
1124 \DeclareUnicodeCharacter{0451}{\cyryo}
1125 %</all,x2,t2c,t2b,t2a,ot2,lcy>
1126 %<all,x2,t2a,ot2>\DeclareUnicodeCharacter{0452}{\cyrdje}
1127 %<*all,x2,t2c,t2b,t2a,ot2,lcy>
1128 \DeclareUnicodeCharacter{0453}{\@tabacckludge'\cyrg}
1129 %</all,x2,t2c,t2b,t2a,ot2,lcy>
1130 %<all,x2,t2a,ot2,lcy>\DeclareUnicodeCharacter{0454}{\cyrie}
1131 %<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0455}{\cyrdze}
1132 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{0456}{\cyrii}
1133 %<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0457}{\cyryi}
1134 %<all,x2,t2c,t2b,t2a,ot2>\DeclareUnicodeCharacter{0458}{\cyrje}
1135 %<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{0459}{\cyrlje}
1136 %<all,x2,t2b,t2a,ot2>\DeclareUnicodeCharacter{045A}{\cyrnje}
1137 %<all,x2,t2a,ot2>\DeclareUnicodeCharacter{045B}{\cyrtshe}
1138 %<*all,x2,t2c,t2b,t2a,ot2,lcy>
1139 \DeclareUnicodeCharacter{045C}{\@tabacckludge'\cyrk}
1140 \DeclareUnicodeCharacter{045D}{\@tabacckludge`\cyri}
1141 %</all,x2,t2c,t2b,t2a,ot2,lcy>
1142 %<all,x2,t2b,t2a,lcy>\DeclareUnicodeCharacter{045E}{\cyrushrt}
1143 %<all,x2,t2c,t2a,ot2>\DeclareUnicodeCharacter{045F}{\cyrdzhe}
1144 %<all,x2,ot2>\DeclareUnicodeCharacter{0462}{\CYRYAT}
1145 %<all,x2,ot2>\DeclareUnicodeCharacter{0463}{\cyryat}
1146 %<all,x2>\DeclareUnicodeCharacter{046A}{\CYRBYUS}
1147 %<all,x2>\DeclareUnicodeCharacter{046B}{\cyrbyus}
1149 % The next two declarations are questionable, the encoding definition
1150 % should probably contain |\CYROTLD| and |\cyrotld|. Or alternatively, if
1151 % the characters in the X2 encodings are really meant to represent the
1152 % historical characters in Ux0472 and Ux0473 (they look like them) then
1153 % they would need to change instead.
1155 % However, their looks are probably a font designers decision and the next
1156 % two mappings are wrong or rather the names in OT2 should change for
1159 % On the other hand the names |\CYROTLD| are somewhat questionabled as the
1160 % Unicode standard only describes ``Cyrillic barred O'' while |TLD| refers
1161 % to a tilde (which is more less what the ``Cyrillic FITA looks according
1162 % to the Unicode book).
1164 %<all,ot2>\DeclareUnicodeCharacter{0472}{\CYRFITA}
1165 %<all,ot2>\DeclareUnicodeCharacter{0473}{\cyrfita}
1169 %<all,x2,ot2>\DeclareUnicodeCharacter{0474}{\CYRIZH}
1170 %<all,x2,ot2>\DeclareUnicodeCharacter{0475}{\cyrizh}
1172 % While the double grave accent seems to exist in X2, T2A, T2B and T2C
1173 % encoding, the letter izhitsa exists only in X2 and OT2. Therefore,
1174 % izhitsa with double grave seems to be possible only using X2.
1176 %<all,x2>\DeclareUnicodeCharacter{0476}{\C\CYRIZH}
1177 %<all,x2>\DeclareUnicodeCharacter{0477}{\C\cyrizh}
1181 %<all,t2c>\DeclareUnicodeCharacter{048C}{\CYRSEMISFTSN}
1182 %<all,t2c>\DeclareUnicodeCharacter{048D}{\cyrsemisftsn}
1183 %<all,t2c>\DeclareUnicodeCharacter{048E}{\CYRRTICK}
1184 %<all,t2c>\DeclareUnicodeCharacter{048F}{\cyrrtick}
1185 %<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0490}{\CYRGUP}
1186 %<all,x2,t2a,lcy>\DeclareUnicodeCharacter{0491}{\cyrgup}
1187 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0492}{\CYRGHCRS}
1188 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0493}{\cyrghcrs}
1189 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{0494}{\CYRGHK}
1190 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{0495}{\cyrghk}
1191 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0496}{\CYRZHDSC}
1192 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{0497}{\cyrzhdsc}
1193 %<all,x2,t2a>\DeclareUnicodeCharacter{0498}{\CYRZDSC}
1194 %<all,x2,t2a>\DeclareUnicodeCharacter{0499}{\cyrzdsc}
1195 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{049A}{\CYRKDSC}
1196 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{049B}{\cyrkdsc}
1197 %<all,x2,t2a>\DeclareUnicodeCharacter{049C}{\CYRKVCRS}
1198 %<all,x2,t2a>\DeclareUnicodeCharacter{049D}{\cyrkvcrs}
1199 %<all,x2,t2c>\DeclareUnicodeCharacter{049E}{\CYRKHCRS}
1200 %<all,x2,t2c>\DeclareUnicodeCharacter{049F}{\cyrkhcrs}
1201 %<all,x2,t2a>\DeclareUnicodeCharacter{04A0}{\CYRKBEAK}
1202 %<all,x2,t2a>\DeclareUnicodeCharacter{04A1}{\cyrkbeak}
1203 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04A2}{\CYRNDSC}
1204 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04A3}{\cyrndsc}
1205 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04A4}{\CYRNG}
1206 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04A5}{\cyrng}
1207 %<all,x2,t2c>\DeclareUnicodeCharacter{04A6}{\CYRPHK}
1208 %<all,x2,t2c>\DeclareUnicodeCharacter{04A7}{\cyrphk}
1209 %<all,x2,t2c>\DeclareUnicodeCharacter{04A8}{\CYRABHHA}
1210 %<all,x2,t2c>\DeclareUnicodeCharacter{04A9}{\cyrabhha}
1211 %<all,x2,t2a>\DeclareUnicodeCharacter{04AA}{\CYRSDSC}
1212 %<all,x2,t2a>\DeclareUnicodeCharacter{04AB}{\cyrsdsc}
1213 %<all,x2,t2c>\DeclareUnicodeCharacter{04AC}{\CYRTDSC}
1214 %<all,x2,t2c>\DeclareUnicodeCharacter{04AD}{\cyrtdsc}
1215 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04AE}{\CYRY}
1216 %<all,x2,t2b,t2a>\DeclareUnicodeCharacter{04AF}{\cyry}
1217 %<all,x2,t2a>\DeclareUnicodeCharacter{04B0}{\CYRYHCRS}
1218 %<all,x2,t2a>\DeclareUnicodeCharacter{04B1}{\cyryhcrs}
1219 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B2}{\CYRHDSC}
1220 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B3}{\cyrhdsc}
1221 %<all,x2,t2c>\DeclareUnicodeCharacter{04B4}{\CYRTETSE}
1222 %<all,x2,t2c>\DeclareUnicodeCharacter{04B5}{\cyrtetse}
1223 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B6}{\CYRCHRDSC}
1224 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04B7}{\cyrchrdsc}
1225 %<all,x2,t2a>\DeclareUnicodeCharacter{04B8}{\CYRCHVCRS}
1226 %<all,x2,t2a>\DeclareUnicodeCharacter{04B9}{\cyrchvcrs}
1227 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04BA}{\CYRSHHA}
1228 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04BB}{\cyrshha}
1229 %<all,x2,t2c>\DeclareUnicodeCharacter{04BC}{\CYRABHCH}
1230 %<all,x2,t2c>\DeclareUnicodeCharacter{04BD}{\cyrabhch}
1231 %<all,x2,t2c>\DeclareUnicodeCharacter{04BE}{\CYRABHCHDSC}
1232 %<all,x2,t2c>\DeclareUnicodeCharacter{04BF}{\cyrabhchdsc}
1234 % The character |\CYRpalochka| is not defined by OT2 and LCY. However it is
1235 % looking identical to |\CYRII| and the Unicode standard explicitly refers
1236 % to that (and to Latin I). So perhaps those encodings could get an alias?
1237 % On the other hand, why are there two distinct slots in the T2 encodings
1238 % even though they are so pressed for space? Perhaps they don't always look
1241 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04C0}{\CYRpalochka}
1245 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04C1}{\U\CYRZH}
1246 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04C2}{\U\cyrzh}
1247 %<all,x2,t2b>\DeclareUnicodeCharacter{04C3}{\CYRKHK}
1248 %<all,x2,t2b>\DeclareUnicodeCharacter{04C4}{\cyrkhk}
1250 % According to the Unicode standard Ux04C5 should be an L with ``tail'' not
1251 % with descender (which also exists as Ux04A2) but it looks as if the char
1252 % names do not make this distinction). Should they?
1254 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C5}{\CYRLDSC}
1255 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C6}{\cyrldsc}
1259 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C7}{\CYRNHK}
1260 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04C8}{\cyrnhk}
1261 %<all,x2,t2b>\DeclareUnicodeCharacter{04CB}{\CYRCHLDSC}
1262 %<all,x2,t2b>\DeclareUnicodeCharacter{04CC}{\cyrchldsc}
1264 % According to the Unicode standard Ux04CD should be an M with ``tail'' not
1265 % with descender. However this time there is no M with descender in the
1268 %<all,x2,t2c>\DeclareUnicodeCharacter{04CD}{\CYRMDSC}
1269 %<all,x2,t2c>\DeclareUnicodeCharacter{04CE}{\cyrmdsc}
1273 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D0}{\U\CYRA}
1274 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D1}{\U\cyra}
1275 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D2}{\"\CYRA}
1276 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D3}{\"\cyra}
1277 %<all,x2,t2a>\DeclareUnicodeCharacter{04D4}{\CYRAE}
1278 %<all,x2,t2a>\DeclareUnicodeCharacter{04D5}{\cyrae}
1279 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D6}{\U\CYRE}
1280 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04D7}{\U\cyre}
1281 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04D8}{\CYRSCHWA}
1282 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04D9}{\cyrschwa}
1283 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04DA}{\"\CYRSCHWA}
1284 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04DB}{\"\cyrschwa}
1285 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DC}{\"\CYRZH}
1286 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DD}{\"\cyrzh}
1287 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DE}{\"\CYRZ}
1288 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04DF}{\"\cyrz}
1289 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04E0}{\CYRABHDZE}
1290 %<all,x2,t2c,t2b>\DeclareUnicodeCharacter{04E1}{\cyrabhdze}
1291 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E2}{\=\CYRI}
1292 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E3}{\=\cyri}
1293 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E4}{\"\CYRI}
1294 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E5}{\"\cyri}
1295 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E6}{\"\CYRO}
1296 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04E7}{\"\cyro}
1297 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04E8}{\CYROTLD}
1298 %<all,x2,t2c,t2b,t2a>\DeclareUnicodeCharacter{04E9}{\cyrotld}
1299 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04EC}{\"\CYREREV}
1300 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04ED}{\"\cyrerev}
1301 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04EE}{\=\CYRU}
1302 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04EF}{\=\cyru}
1303 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F0}{\"\CYRU}
1304 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F1}{\"\cyru}
1305 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F2}{\H\CYRU}
1306 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F3}{\H\cyru}
1307 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F4}{\"\CYRCH}
1308 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F5}{\"\cyrch}
1309 %<all,x2,t2b>\DeclareUnicodeCharacter{04F6}{\CYRGDSC}
1310 %<all,x2,t2b>\DeclareUnicodeCharacter{04F7}{\cyrgdsc}
1311 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F8}{\"\CYRERY}
1312 %<all,x2,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{04F9}{\"\cyrery}
1313 %<all,t2b>\DeclareUnicodeCharacter{04FA}{\CYRGDSCHCRS}
1314 %<all,t2b>\DeclareUnicodeCharacter{04FB}{\cyrgdschcrs}
1315 %<all,x2,t2b>\DeclareUnicodeCharacter{04FC}{\CYRHHK}
1316 %<all,x2,t2b>\DeclareUnicodeCharacter{04FD}{\cyrhhk}
1317 %<all,t2b>\DeclareUnicodeCharacter{04FE}{\CYRHHCRS}
1318 %<all,t2b>\DeclareUnicodeCharacter{04FF}{\cyrhhcrs}
1319 %<all,ts1>\DeclareUnicodeCharacter{0E3F}{\textbaht}
1320 %<all,x2,t2c,t2b,t2a,t1,utf8>\DeclareUnicodeCharacter{200C}{\textcompwordmark}
1321 %<*all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
1322 \DeclareUnicodeCharacter{2013}{\textendash}
1323 \DeclareUnicodeCharacter{2014}{\textemdash}
1324 %</all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
1325 %<all,ts1>\DeclareUnicodeCharacter{2016}{\textbardbl}
1326 %<*all,x2,t2c,t2b,t2a,t1,ot2,ot1,lcy>
1327 \DeclareUnicodeCharacter{2018}{\textquoteleft}
1328 \DeclareUnicodeCharacter{2019}{\textquoteright}
1329 %</all,x2,t2c,t2b,t2a,t1,ot2,ot1,lcy>
1330 %<all,t1>\DeclareUnicodeCharacter{201A}{\quotesinglbase}
1331 %<*all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
1332 \DeclareUnicodeCharacter{201C}{\textquotedblleft}
1333 \DeclareUnicodeCharacter{201D}{\textquotedblright}
1334 %</all,x2,t2c,t2b,t2a,t1,ot2,ot1,ly1,lcy>
1335 %<all,x2,t2c,t2b,t2a,t1,lcy>\DeclareUnicodeCharacter{201E}{\quotedblbase}
1336 %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2020}{\textdagger}
1337 %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2021}{\textdaggerdbl}
1338 %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2022}{\textbullet}
1339 %<all,ly1,utf8>\DeclareUnicodeCharacter{2026}{\textellipsis}
1340 %<*all,x2,ts1,t2c,t2b,t2a,t1,ly1>
1341 \DeclareUnicodeCharacter{2030}{\textperthousand}
1342 %</all,x2,ts1,t2c,t2b,t2a,t1,ly1>
1343 %<*all,x2,ts1,t2c,t2b,t2a,t1>
1344 \DeclareUnicodeCharacter{2031}{\textpertenthousand}
1345 %</all,x2,ts1,t2c,t2b,t2a,t1>
1346 %<all,t1,ly1>\DeclareUnicodeCharacter{2039}{\guilsinglleft}
1347 %<all,t1,ly1>\DeclareUnicodeCharacter{203A}{\guilsinglright}
1348 %<all,ts1>\DeclareUnicodeCharacter{203B}{\textreferencemark}
1349 %<all,ts1>\DeclareUnicodeCharacter{203D}{\textinterrobang}
1350 %<all,ts1>\DeclareUnicodeCharacter{2044}{\textfractionsolidus}
1351 %<all,ts1>\DeclareUnicodeCharacter{204E}{\textasteriskcentered}
1352 %<all,ts1>\DeclareUnicodeCharacter{2052}{\textdiscount}
1353 %<all,ts1>\DeclareUnicodeCharacter{20A1}{\textcolonmonetary}
1354 %<all,ts1>\DeclareUnicodeCharacter{20A4}{\textlira}
1355 %<all,ts1>\DeclareUnicodeCharacter{20A6}{\textnaira}
1356 %<all,ts1>\DeclareUnicodeCharacter{20A9}{\textwon}
1357 %<all,ts1>\DeclareUnicodeCharacter{20AB}{\textdong}
1358 %<all,ts1>\DeclareUnicodeCharacter{20AC}{\texteuro}
1359 %<all,ts1>\DeclareUnicodeCharacter{20B1}{\textpeso}
1360 %<all,ts1>\DeclareUnicodeCharacter{2103}{\textcelsius}
1361 %<all,x2,ts1,t2c,t2b,t2a,ot2,lcy>\DeclareUnicodeCharacter{2116}{\textnumero}
1362 %<all,ts1>\DeclareUnicodeCharacter{2117}{\textcircledP}
1363 %<all,ts1>\DeclareUnicodeCharacter{211E}{\textrecipe}
1364 %<all,ts1>\DeclareUnicodeCharacter{2120}{\textservicemark}
1365 %<all,ts1,ly1,utf8>\DeclareUnicodeCharacter{2122}{\texttrademark}
1366 %<all,ts1>\DeclareUnicodeCharacter{2126}{\textohm}
1367 %<all,ts1>\DeclareUnicodeCharacter{2127}{\textmho}
1368 %<all,ts1>\DeclareUnicodeCharacter{212E}{\textestimated}
1369 %<all,ts1>\DeclareUnicodeCharacter{2190}{\textleftarrow}
1370 %<all,ts1>\DeclareUnicodeCharacter{2191}{\textuparrow}
1371 %<all,ts1>\DeclareUnicodeCharacter{2192}{\textrightarrow}
1372 %<all,ts1>\DeclareUnicodeCharacter{2193}{\textdownarrow}
1373 %<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{2329}{\textlangle}
1374 %<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{232A}{\textrangle}
1375 %<all,ts1>\DeclareUnicodeCharacter{2422}{\textblank}
1376 %<all,x2,t2c,t2b,t2a,t1,utf8>\DeclareUnicodeCharacter{2423}{\textvisiblespace}
1377 %<all,ts1>\DeclareUnicodeCharacter{25E6}{\textopenbullet}
1378 %<all,ts1>\DeclareUnicodeCharacter{25EF}{\textbigcircle}
1379 %<all,ts1>\DeclareUnicodeCharacter{266A}{\textmusicalnote}
1382 % \subsection{Notes}
1384 % \changes{v1.1e}{2004/05/22}{Added notes on inconsistency with `8-bit files'.}
1385 % The following inputs are inconsistent with the 8-bit inputenc files
1386 % since they will always only produce the `text character'. This is an
1387 % area where inputenc is notoriously confused.
1389 % %<all,ts1,t1,ot1,ly1>\DeclareUnicodeCharacter{00A3}{\textsterling}
1390 % %<*all,x2,ts1,t2c,t2b,t2a,oms,ly1>
1391 % \DeclareUnicodeCharacter{00A7}{\textsection}
1392 % %</all,x2,ts1,t2c,t2b,t2a,oms,ly1>
1393 % %<all,ts1,utf8>\DeclareUnicodeCharacter{00A9}{\textcopyright}
1394 % %<all,ts1>\DeclareUnicodeCharacter{00B1}{\textpm}
1395 % %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{00B6}{\textparagraph}
1396 % %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2020}{\textdagger}
1397 % %<all,ts1,oms,ly1>\DeclareUnicodeCharacter{2021}{\textdaggerdbl}
1398 % %<all,ly1,utf8>\DeclareUnicodeCharacter{2026}{\textellipsis}
1401 % The following definitions are in an encoding file but have no
1402 % direct equivalent in Unicode, or they simply do not make sense in that
1403 % context (or we have not yet found anything or \ldots :-). For
1404 % example, the non-combining accent characters are certainly
1405 % available somewhere but these are not equivalent to a \TeX{}
1408 %\DeclareTextSymbol{\j}{OT1}{17}
1409 %\DeclareTextSymbol{\SS}{T1}{223}
1410 %\DeclareTextSymbol{\textcompwordmark}{T1}{23}
1412 %\DeclareTextAccent{\"}{OT1}{127}
1413 %\DeclareTextAccent{\'}{OT1}{19}
1414 %\DeclareTextAccent{\.}{OT1}{95}
1415 %\DeclareTextAccent{\=}{OT1}{22}
1416 %\DeclareTextAccent{\H}{OT1}{125}
1417 %\DeclareTextAccent{\^}{OT1}{94}
1418 %\DeclareTextAccent{\`}{OT1}{18}
1419 %\DeclareTextAccent{\r}{OT1}{23}
1420 %\DeclareTextAccent{\u}{OT1}{21}
1421 %\DeclareTextAccent{\v}{OT1}{20}
1422 %\DeclareTextAccent{\~}{OT1}{126}
1423 %\DeclareTextCommand{\b}{OT1}[1]
1424 %\DeclareTextCommand{\c}{OT1}[1]
1425 %\DeclareTextCommand{\d}{OT1}[1]
1426 %\DeclareTextCommand{\k}{T1}[1]
1431 % \subsection{Mappings for OT1 glyphs}
1433 % This is even more incomplete as again it covers only the single
1434 % glyphs from |OT1| plus some that have been explicitly defined for
1435 % this encoding. Everything that is provided in |T1|, and that
1436 % could be provided as composite glyphs via |OT1|, could and
1437 % probably should be set up as well. Which leaves the many things
1438 % that are not provided in |T1| but can be provided in |OT1| (and
1439 % in |T1|) by composite glyphs.
1443 % Stuff not mapped (note that |\j| ($\jmath$) is not equivalent to any
1444 % Unicode character):
1446 %\DeclareTextSymbol{\j}{OT1}{17}
1447 %\DeclareTextAccent{\"}{OT1}{127}
1448 %\DeclareTextAccent{\'}{OT1}{19}
1449 %\DeclareTextAccent{\.}{OT1}{95}
1450 %\DeclareTextAccent{\=}{OT1}{22}
1451 %\DeclareTextAccent{\^}{OT1}{94}
1452 %\DeclareTextAccent{\`}{OT1}{18}
1453 %\DeclareTextAccent{\~}{OT1}{126}
1454 %\DeclareTextAccent{\H}{OT1}{125}
1455 %\DeclareTextAccent{\u}{OT1}{21}
1456 %\DeclareTextAccent{\v}{OT1}{20}
1457 %\DeclareTextAccent{\r}{OT1}{23}
1458 %\DeclareTextCommand{\b}{OT1}[1]
1459 %\DeclareTextCommand{\c}{OT1}[1]
1460 %\DeclareTextCommand{\d}{OT1}[1]
1465 % \subsection{Mappings for OMS glyphs}
1467 % Characters like |\textbackslash| are not mapped as they are
1468 % (primarily) only in the lower 127 and the code here only sets up
1469 % mappings for UTF-8 characters that are at least 2 octets long.
1471 %\DeclareTextSymbol{\textbackslash}{OMS}{110} % "6E
1472 %\DeclareTextSymbol{\textbar}{OMS}{106} % "6A
1473 %\DeclareTextSymbol{\textbraceleft}{OMS}{102} % "66
1474 %\DeclareTextSymbol{\textbraceright}{OMS}{103} % "67
1477 % But the following (and some others) might actually lurk in Unicode
1480 %\DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03
1481 %\DeclareTextCommand{\textcircled}{OMS}
1487 % \subsection{Mappings for TS1 glyphs}
1489 % Exercise for somebody else.
1492 % \subsection{Mappings for \texttt{latex.ltx} glyphs}
1494 % There is also a collection of characters already set up in the kernel,
1495 % one way or the other. Since these do not clearly relate to any
1496 % particular font encoding they are mapped when the
1497 % \texttt{utf8} support is first set up.
1499 % Also there are a number of |\providecommand|s in the various input
1500 % encoding files which may or may not go into this part.
1501 % \changes{v1.1b}{2004/02/09}{Added commands already defined in the kernel}
1504 % This space is intentionally empty ...
1509 % \section{A test document}
1511 % Here is a very small test document which may or may not survive
1512 % if the current document is transferred from one place to the
1516 \documentclass{article}
1518 \usepackage[latin1,utf8]{inputenc}
1519 \usepackage[T1]{fontenc}
1522 \scrollmode % to run past the error below
1526 German umlauts in UTF-8: ^^c3^^a4^^c3^^b6^^c3^^bc %%% äöü
1528 \inputencoding{latin1} % switch to latin1
1530 German umlauts in UTF-8 but read by latin1 (and will produce one
1531 error since \verb=\textcurrency= is not provided):
1532 ^^c3^^a4^^c3^^b6^^c3^^bc
1534 \inputencoding{utf8} % switch back to utf8
1536 German umlauts in UTF-8: ^^c3^^a4^^c3^^b6^^c3^^bc
1539 Some codes that should produce errors as nothing is set up
1540 for them: ^^c3F ^^e1^^a4^^b6
1542 And some that are not legal utf8 sequences: ^^c3X ^^e1XY