diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/base/utf8.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/base/utf8.def | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/base/utf8.def b/Master/texmf-dist/tex/latex/base/utf8.def index fd3bfed819f..ee2a25e7df5 100644 --- a/Master/texmf-dist/tex/latex/base/utf8.def +++ b/Master/texmf-dist/tex/latex/base/utf8.def @@ -13,7 +13,7 @@ %% (but please observe conditions on bug reports sent to that address!) %% %% -%% Copyright (C) 1993-2021 +%% Copyright (C) 1993-2022 %% The LaTeX Project and any individual authors listed elsewhere %% in this file. %% @@ -42,7 +42,7 @@ %% and covered by LPPL is defined by the unpacking scripts (with %% extension .ins) which are part of the distribution. \ProvidesFile{utf8.def} - [2021/06/21 v1.2n UTF-8 support] + [2022/06/07 v1.3c UTF-8 support] \ifx\ifincsname\@undefined % old e-pTeX or e-upTeX engines \input utf8-2018.def \expandafter\@firstofone @@ -83,13 +83,13 @@ \fi \UTFviii@four@octets@combine } -\long\def\UTF@two@octets@noexpand#1#2{\noexpand#2\noexpand} -\long\def\UTF@three@octets@noexpand#1#2#3{\noexpand#2\noexpand#3\noexpand} -\long\def\UTF@four@octets@noexpand#1#2#3#4{\noexpand#2\noexpand#3\noexpand#4\noexpand} +\long\def\UTF@two@octets@noexpand#1#2#3{\unexpanded{#2#3}} +\long\def\UTF@three@octets@noexpand#1#2#3#4{\unexpanded{#2#3#4}} +\long\def\UTF@four@octets@noexpand#1#2#3#4#5{\unexpanded{#2#3#4#5}} -\long\def\UTF@two@octets@string#1#2{\string#2\string} -\long\def\UTF@three@octets@string#1#2#3{\string#2\string#3\string} -\long\def\UTF@four@octets@string#1#2#3#4{\string#2\string#3\string#4\string} +\long\def\UTF@two@octets@string#1#2#3{\detokenize{#2#3}} +\long\def\UTF@three@octets@string#1#2#3#4{\detokenize{#2#3#4}} +\long\def\UTF@four@octets@string#1#2#3#4#5{\detokenize{#2#3#4#5}} \long\def\UTFviii@two@octets@combine#1#2{\expandafter \UTFviii@defined\csname u8:\string#1\string#2\endcsname} @@ -145,7 +145,13 @@ \expandafter\UTFviii@check@continue \fi } -\begingroup +\edef\reserved@a{% +\catcode`\noexpand\~=\the\catcode`\~\relax +\catcode`\noexpand\"=\the\catcode`\"\relax +\uccode`\noexpand\~=\the\uccode`\~\relax +\count@=\the\count@\relax +\@tempcnta=\the\@tempcnta\relax +\let\noexpand\reserved@a\relax} \catcode`\~13 \catcode`\"12 \def\UTFviii@loop{% @@ -155,7 +161,7 @@ \ifnum\count@<\@tempcnta \expandafter\UTFviii@loop \fi} - \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@undefined@err{:\string~}}} + \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@undefined@err{:\string~}}} \count@"1 \@tempcnta9 \UTFviii@loop @@ -167,25 +173,25 @@ \UTFviii@loop \count@"80 \@tempcnta"C2 - \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}} + \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@invalid@err\string~}} \UTFviii@loop \count@"C2 \@tempcnta"E0 - \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\noexpand~}} + \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@two@octets\noexpand~}} \UTFviii@loop \count@"E0 \@tempcnta"F0 - \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\noexpand~}} + \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@three@octets\noexpand~}} \UTFviii@loop \count@"F0 \@tempcnta"F5 - \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\noexpand~}} + \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@four@octets\noexpand~}} \UTFviii@loop \count@"F5 \@tempcnta"100 - \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}} + \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@invalid@err\string~}} \UTFviii@loop -\endgroup +\reserved@a \@inpenc@test \ifx\@begindocumenthook\@undefined \makeatother @@ -215,11 +221,11 @@ \endgroup } \gdef\parse@XML@charref{% - \ifnum\count@<"A0\relax + \ifnum\count@<"80\relax \ifnum\catcode\count@=13 \uccode`\~=\count@\uppercase{\def\UTFviii@tmp{\@empty\@empty~}}% \else - \@latex@error{Cannot define non-active Unicode char value < 00A0}% + \@latex@error{Cannot define non-active Unicode char value < 0080}% \@eha \def\UTFviii@tmp{\UTFviii@tmp}% \fi |