[latex3-commits] [git/LaTeX3-latex3-latex2e] master: C0 controls back to catcocde 15 for luatex/xetex (as in previous formats) add \UseRawInputEncoding C0 controls to catcode 12 in filecontents (92c0adb)

David Carlisle d.p.carlisle at gmail.com
Fri Mar 30 10:57:17 CEST 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/92c0adb079c135c557d74c2603092aacc1d84832

>---------------------------------------------------------------

commit 92c0adb079c135c557d74c2603092aacc1d84832
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Fri Mar 30 09:57:17 2018 +0100

    C0 controls back to catcocde 15 for luatex/xetex (as in previous formats)
    add \UseRawInputEncoding C0 controls to catcode 12 in filecontents


>---------------------------------------------------------------

92c0adb079c135c557d74c2603092aacc1d84832
 base/ltclass.dtx                      |    6 ++
 base/ltfinal.dtx                      |   86 ++++++++++++++++-----
 base/testfiles/tlb-utf8-c0.luatex.tlg |   12 ++-
 base/testfiles/tlb-utf8-c0.xetex.tlg  |   12 ++-
 base/testfiles/tltx001.luatex.tlg     |  132 +++++++++++++++++++++++++++++++++
 base/testfiles/tltx001.xetex.tlg      |  132 +++++++++++++++++++++++++++++++++
 6 files changed, 355 insertions(+), 25 deletions(-)

diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 406806b..91194a2 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -1702,6 +1702,12 @@
 % \changes{v1.0p}{1995/05/25}{Delete \cs{filec at ntents} after preamble}
 %    \begin{macrocode}
 \begingroup%
+\@tempcnta=1
+\loop
+  \catcode\@tempcnta=12  %
+  \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32      %
+\repeat                  %
 \catcode`\*=11 %
 \catcode`\^^M\active%
 \catcode`\^^L\active\let^^L\relax%
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 2993416..c670c54 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -557,6 +557,15 @@
 %<*2ekernel|latexrelease>
 %    \end{macrocode}
 %
+% Check that a classic 8-bit tex engine is being used (LaTeX or PDFLaTeX).
+%
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2018/04/01}%
+%<latexrelease>                 {\UTFviii at invalid}{UTF-8 default}%
+%    \end{macrocode}
+%
+%
+% Skip this section in Unicode TeX, or if  MLTeX and EncTeX are enabled.
 %    \begin{macrocode}
 \ifnum0%
   \ifx\Umathchar\@undefined\else 1\fi
@@ -566,12 +575,6 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%<latexrelease>\IncludeInRelease{2018/04/01}%
-%<latexrelease>                 {\UTFviii at invalid}{UTF-8 default}%
-%    \end{macrocode}
-%
-%
-%    \begin{macrocode}
 \def\saved at space@catcode{10}
 \let\@inpenc at test\relax
 \def\IeC{%
@@ -583,33 +586,84 @@
 }
 %    \end{macrocode}
 %
-% Make characters active for UTF-8 input
+% Make characters active for UTF-8 input formats
 %    \begin{macrocode}
 \@tempcnta=1
 \loop
+  \catcode\@tempcnta=13  %
+  \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32      %
+\repeat                  %
+\catcode0=15  % null
+\catcode9=10  % tab
+\catcode10=12 % ctrl J
+\catcode12=13 % ctrl L
+\catcode13=5  % newline
+\@tempcnta=128
+\loop
   \catcode\@tempcnta=13
   \advance\@tempcnta\@ne
-\ifnum\@tempcnta<32
+\ifnum\@tempcnta<256
 \repeat
-\catcode0=15  %null
-\catcode9=10  %tab
+%    \end{macrocode}
+%
+% \begin{macro}
+% \changes{v2.1a}{2018/03/25}{Macro added}
+% Reset 8 bit characters to catcode 12 so the input endcoing matches the ``Raw''
+% font encoding.
+% Useful for special behaviours, or for compatibility with older \LaTeX\ formats.
+%    \begin{macrocode}
+\def\UseRawInputEncoding{%
+\@tempcnta=1
+\loop
+  \catcode\@tempcnta=15  %
+  \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32      %
+\repeat                  %
+\catcode0=15  % null
+\catcode9=10  % tab
 \catcode10=12 % ctrl J
-\catcode12=13 %ctrl L
-\def^^L{\par}
-\catcode13=5  %newline
+\catcode12=13 % ctrl L
+\catcode13=5  % newline
 \@tempcnta=128
 \loop
-  \catcode\@tempcnta=13
+  \catcode\@tempcnta=12
   \advance\@tempcnta\@ne
 \ifnum\@tempcnta<256
 \repeat
+}
 %    \end{macrocode}
+% \end{macro}
 %
 %    \begin{macrocode}
 \edef\inputencodingname{utf8}%
 \input{utf8.def}
 \let\@inpenc at test\@undefined
 \let\saved at space@catcode\@undefined
+%    \end{macrocode}
+%
+% For formats not set up for UTF-8 default, set the C0 controls to catcode 15.
+%    \begin{macrocode}
+\else
+\@tempcnta=0
+\loop
+  \catcode\@tempcnta=15  %
+  \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32      %
+\repeat                  %
+\catcode0=15  % null
+\catcode9=10  % tab
+\catcode10=12 % ctrl J
+\catcode12=13 % ctrl L
+\catcode13=5  % newline
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\let\UseRawInputEncoding\relax
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\fi
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
@@ -649,13 +703,11 @@
 %<latexrelease>  \global\@namedef{M@#1}{\default at M#3}%
 %<latexrelease>  \xdef\LastDeclaredEncoding{#1}%
 %<latexrelease>  }
+%<latexrelease>  \let\UseRawInputEncoding\@undefined
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%<*2ekernel|latexrelease>
-\fi
-%</2ekernel|latexrelease>
 %<*2ekernel>
 %    \begin{macrocode}
 %
diff --git a/base/testfiles/tlb-utf8-c0.luatex.tlg b/base/testfiles/tlb-utf8-c0.luatex.tlg
index f858b75..ed2f166 100644
--- a/base/testfiles/tlb-utf8-c0.luatex.tlg
+++ b/base/testfiles/tlb-utf8-c0.luatex.tlg
@@ -2,17 +2,21 @@ This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
 > 15.
 l. ...\showthe\catcode0
-> 12.
+> 15.
 l. ...\showthe\catcode4
-> 12.
+> 15.
 l. ...\showthe\catcode11
 > 12.
 l. ...\showthe\catcode150
 > 15.
 l. ...\showthe\catcode0
-> 12.
+> 15.
 l. ...\showthe\catcode4
-> 12.
+> 15.
 l. ...\showthe\catcode11
 > 12.
 l. ...\showthe\catcode150
+! Text line contains an invalid character.
+l. ...^^07
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
diff --git a/base/testfiles/tlb-utf8-c0.xetex.tlg b/base/testfiles/tlb-utf8-c0.xetex.tlg
index f858b75..ed2f166 100644
--- a/base/testfiles/tlb-utf8-c0.xetex.tlg
+++ b/base/testfiles/tlb-utf8-c0.xetex.tlg
@@ -2,17 +2,21 @@ This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
 > 15.
 l. ...\showthe\catcode0
-> 12.
+> 15.
 l. ...\showthe\catcode4
-> 12.
+> 15.
 l. ...\showthe\catcode11
 > 12.
 l. ...\showthe\catcode150
 > 15.
 l. ...\showthe\catcode0
-> 12.
+> 15.
 l. ...\showthe\catcode4
-> 12.
+> 15.
 l. ...\showthe\catcode11
 > 12.
 l. ...\showthe\catcode150
+! Text line contains an invalid character.
+l. ...^^07
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
diff --git a/base/testfiles/tltx001.luatex.tlg b/base/testfiles/tltx001.luatex.tlg
index 0314e6d..5637c98 100644
--- a/base/testfiles/tltx001.luatex.tlg
+++ b/base/testfiles/tltx001.luatex.tlg
@@ -1743,9 +1743,141 @@ Type  H <return>  for immediate help.
 l. ...\mbox{\verb=zyx=}
 Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
+! Text line contains an invalid character.
+l. ...^^A
+       ^^B^^C^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B
+          ^^C^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C
+             ^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D
+                ^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E
+                   ^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F
+                      ^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F^^G
+                         ^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F^^G^^H
+                            ^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N
+       ^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O
+          ^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P
+             ^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q
+                ^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R
+                   ^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S
+                      ^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T
+                         ^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U
+                            ^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V
+                               ^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W
+                                  ^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X
+                                     ^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y
+                                        ^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[
+       ^^\^^]^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\
+          ^^]^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\^^]
+             ^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
 ! ^^^^ needs four hex digits, end of input.
 l. ...^^[^^\^^]^
               ^^^^_
+! Text line contains an invalid character.
+l. ...^^[^^\^^]^^^
+                ^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\^^]^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
 LaTeX Warning: Citation `Pratchett:Weird-Sisters' on page 12 undefined on input line ....
 ! LaTeX Error: Too many columns in eqnarray environment.
 See the LaTeX manual or LaTeX Companion for explanation.
diff --git a/base/testfiles/tltx001.xetex.tlg b/base/testfiles/tltx001.xetex.tlg
index 32a650b..cc2d5e7 100644
--- a/base/testfiles/tltx001.xetex.tlg
+++ b/base/testfiles/tltx001.xetex.tlg
@@ -1520,6 +1520,138 @@ Type  H <return>  for immediate help.
 l. ...\mbox{\verb=zyx=}
 Try typing  <return>  to proceed.
 If that doesn't work, type  X <return>  to quit.
+! Text line contains an invalid character.
+l. ...^^A
+         ^^B^^C^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B
+            ^^C^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C
+               ^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D
+                  ^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E
+                     ^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F
+                        ^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F^^G
+                           ^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F^^G^^H
+                              ^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^A^^B^^C^^D^^E^^F^^G^^H^^I^^J^^K
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N
+         ^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O
+            ^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P
+               ^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q
+                  ^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R
+                     ^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S
+                        ^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T
+                           ^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U
+                              ^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V
+                                 ^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W
+                                    ^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X
+                                       ^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y
+                                          ^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^N^^O^^P^^Q^^R^^S^^T^^U^^V^^W^^X^^Y^^Z
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[
+         ^^\^^]^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\
+            ^^]^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\^^]
+               ^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\^^]^^^
+                  ^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
+! Text line contains an invalid character.
+l. ...^^[^^\^^]^^^^^_
+A funny symbol that I can't read has just been input.
+Continue, and I'll forget that it ever happened.
 LaTeX Warning: Citation `Pratchett:Weird-Sisters' on page 12 undefined on input line ....
 ! LaTeX Error: Too many columns in eqnarray environment.
 See the LaTeX manual or LaTeX Companion for explanation.





More information about the latex3-commits mailing list