diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-11 22:32:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-11 22:32:49 +0000 |
commit | b8f67cb908880c8fdf6b03eb9c4d5219d7409171 (patch) | |
tree | 87574d214a3f39e7293bc54e2b40076ae052bed3 /Master/texmf-dist/tex/latex/base/utf8.def | |
parent | 6ffd766f7627989e12bfb89d63f908de8c052c81 (diff) |
latex(2e) (11dec18)
git-svn-id: svn://tug.org/texlive/trunk@49390 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/base/utf8.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/base/utf8.def | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/base/utf8.def b/Master/texmf-dist/tex/latex/base/utf8.def index 715d81bceb3..c7efc7d1861 100644 --- a/Master/texmf-dist/tex/latex/base/utf8.def +++ b/Master/texmf-dist/tex/latex/base/utf8.def @@ -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} - [2018/04/05 v1.2c UTF-8 support for inputenc] + [2018/10/05 v1.2f UTF-8 support for inputenc] \makeatletter \catcode`\ \saved@space@catcode \long\def\UTFviii@two@octets#1#2{\expandafter @@ -64,7 +64,7 @@ \fi } \def\UTFviii@invalid@err#1{% - \PackageError{inputenc}{Invalid UTF-8 byte \number`#1}% + \PackageError{inputenc}{Invalid UTF-8 byte "\UTFviii@hexnumber{`#1}}% \UTFviii@invalid@help} \def\UTFviii@invalid@help{% The document does not appear to be in UTF-8 encoding.\MessageBreak @@ -131,10 +131,10 @@ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\string~}} \UTFviii@loop \count@"F0 - \@tempcnta"F4 + \@tempcnta"F5 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\string~}} \UTFviii@loop - \count@"F4 + \count@"F5 \@tempcnta"100 \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}} \UTFviii@loop @@ -185,6 +185,11 @@ \parse@UTFviii@a,% \parse@UTFviii@b E\UTFviii@three@octets.{,;}% \else + \ifnum\count@>"10FFFF\relax + \PackageError{inputenc}% + {\UTFviii@hexnumber\count@\space too large for Unicode}% + {Values between 0 and 10FFFF are permitted}% + \fi \parse@UTFviii@a;% \parse@UTFviii@a,% \parse@UTFviii@a!% @@ -250,14 +255,16 @@ 0\or1\or2\or3\or4\or5\or6\or7\or8\or9\or A\or B\or C\or D\or E\or F\fi} \fi -\ifx\numexpr\@undefined -\gdef\UTFviii@splitcsname#1:#2\relax{#2}} -\else +\gdef\UTFviii@hexcodepoint#1{U+% + \ifnum#1<16 0\fi + \ifnum#1<256 0\fi + \ifnum#1<4096 0\fi + \UTFviii@hexnumber{#1}% +}% \gdef\UTFviii@splitcsname#1:#2\relax{% -#2 (U+\expandafter\UTFviii@hexnumber\expandafter{% +#2 (\expandafter\UTFviii@hexcodepoint\expandafter{% \the\numexpr\decode@UTFviii#2\relax})% } -\fi \endgroup \@onlypreamble\DeclareUnicodeCharacter \@onlypreamble\parse@XML@charref |