summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/base/utf8.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-04 20:57:14 +0000
committerKarl Berry <karl@freefriends.org>2019-10-04 20:57:14 +0000
commit70aaae3b3c98fb6357c846ad54ce2367e9682f50 (patch)
treef0446e015c31510a11ada780ad4978dce03ad104 /Master/texmf-dist/tex/latex/base/utf8.def
parentbe53f9d0af947622afca67b99c89a90d5c08dbd4 (diff)
latex2e (4oct19)
git-svn-id: svn://tug.org/texlive/trunk@52286 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.def70
1 files changed, 58 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/base/utf8.def b/Master/texmf-dist/tex/latex/base/utf8.def
index c7efc7d1861..ab04f853918 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 1993-2017
+%% Copyright (C) 1993-2019
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -26,7 +26,7 @@
%% The latest version of this license is in
%% https://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.
+%% version 2008 or later.
%%
%% This file has the LPPL maintenance status "maintained".
%%
@@ -42,15 +42,61 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{utf8.def}
- [2018/10/05 v1.2f UTF-8 support for inputenc]
+ [2019/07/11 v1.2j UTF-8 support for inputenc]
+\ifx\ifincsname\@undefined % old e-pTeX or e-upTeX engines
+ \input utf8-2018.def
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+ \endinput
\makeatletter
\catcode`\ \saved@space@catcode
-\long\def\UTFviii@two@octets#1#2{\expandafter
- \UTFviii@defined\csname u8:#1\string#2\endcsname}
-\long\def\UTFviii@three@octets#1#2#3{\expandafter
- \UTFviii@defined\csname u8:#1\string#2\string#3\endcsname}
-\long\def\UTFviii@four@octets#1#2#3#4{\expandafter
- \UTFviii@defined\csname u8:#1\string#2\string#3\string#4\endcsname}
+\long\def\UTFviii@two@octets{%
+ \ifincsname
+ \expandafter \UTF@two@octets@string
+ \else
+ \ifx \protect\@typeset@protect \else
+ \expandafter\expandafter\expandafter \UTF@two@octets@noexpand
+ \fi
+ \fi
+ \UTFviii@two@octets@combine
+}
+
+\long\def\UTFviii@three@octets{%
+ \ifincsname
+ \expandafter \UTF@three@octets@string
+ \else
+ \ifx \protect\@typeset@protect \else
+ \expandafter\expandafter\expandafter \UTF@three@octets@noexpand
+ \fi
+ \fi
+ \UTFviii@three@octets@combine
+}
+\long\def\UTFviii@four@octets{%
+ \ifincsname
+ \expandafter \UTF@four@octets@string
+ \else
+ \ifx \protect\@typeset@protect \else
+ \expandafter\expandafter\expandafter \UTF@four@octets@noexpand
+ \fi
+ \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@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\UTFviii@two@octets@combine#1#2{\expandafter
+ \UTFviii@defined\csname u8:\string#1\string#2\endcsname}
+\long\def\UTFviii@three@octets@combine#1#2#3{\expandafter
+ \UTFviii@defined\csname u8:\string#1\string#2\string#3\endcsname}
+\long\def\UTFviii@four@octets@combine#1#2#3#4{\expandafter
+ \UTFviii@defined\csname u8:\string#1\string#2\string#3\string#4\endcsname}
\def\UTFviii@defined#1{%
\ifx#1\relax
\if\relax\expandafter\UTFviii@checkseq\string#1\relax\relax
@@ -124,15 +170,15 @@
\UTFviii@loop
\count@"C2
\@tempcnta"E0
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\string~}}
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\noexpand~}}
\UTFviii@loop
\count@"E0
\@tempcnta"F0
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\string~}}
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\noexpand~}}
\UTFviii@loop
\count@"F0
\@tempcnta"F5
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\string~}}
+ \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\noexpand~}}
\UTFviii@loop
\count@"F5
\@tempcnta"100