[latex3-commits] [git/LaTeX3-latex3-latex3] master: Catcode correction for 8-bit engines (6feca5b)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri May 3 19:56:21 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/6feca5b010bdd2b93a65989f91311000d712b57e

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

commit 6feca5b010bdd2b93a65989f91311000d712b57e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri May 3 18:56:21 2019 +0100

    Catcode correction for 8-bit engines


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

6feca5b010bdd2b93a65989f91311000d712b57e
 l3kernel/l3candidates.dtx        |    6 ++-
 l3kernel/testfiles/m3char001.tlg |  100 ++++++--------------------------------
 2 files changed, 18 insertions(+), 88 deletions(-)

diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 459e708..6d9c9d9 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -2435,7 +2435,8 @@
   { \char_generate:nn { `#1 } { \char_value_catcode:n { `#1 } } }
 \bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: }
   {
-    \cs_set_eq:NN \@@_change_case:nN \use_ii:nn
+    \cs_set:Npn \@@_change_case:nN #1#2
+      { \char_generate:nn {#1} { \char_value_catcode:n {#1} } }
   }
 %    \end{macrocode}
 %   Same story for the string version, except category code is easier
@@ -2467,7 +2468,8 @@
   }
 \bool_lazy_or:nnF { \sys_if_engine_luatex_p: } { \sys_if_engine_xetex_p: }
   {
-    \cs_set_eq:NN \@@_str_change_case:nN \use_ii:nn
+    \cs_set:Npn \@@_str_change_case:nN #1#2
+      { \char_generate:nn {#1} { 12 } }
   }
 %    \end{macrocode}
 % \end{macro}
diff --git a/l3kernel/testfiles/m3char001.tlg b/l3kernel/testfiles/m3char001.tlg
index ff98283..2d9ed44 100644
--- a/l3kernel/testfiles/m3char001.tlg
+++ b/l3kernel/testfiles/m3char001.tlg
@@ -708,7 +708,7 @@ The token list contains the tokens:
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  A (the letter A).
+>  A (the character A).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
@@ -716,7 +716,7 @@ The token list contains the tokens:
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  A (the letter A).
+>  A (the character A).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
@@ -724,7 +724,7 @@ The token list contains the tokens:
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  Z (the letter Z).
+>  Z (the character Z).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
@@ -732,111 +732,39 @@ The token list contains the tokens:
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  Z (the letter Z).
+>  Z (the character Z).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  * (the character *).
+>  ^^@ (the character ^^@).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  * (the character *).
+>  ^^@ (the character ^^@).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  * (the character *).
+>  ^^@ (the character ^^@).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  * (the character *).
+>  ^^@ (the character ^^@).
 <recently read> }
 l. ...    }
-! Argument of \UTFviii at two@octets has an extra }.
-<inserted text> 
-                \par 
-l. ...    }
-I've run across a `}' that doesn't seem to match anything.
-For example, `\def\a#1{...}' and `\a}' would produce
-this error. If you simply proceed now, the `\par' that
-I've just inserted will cause me to report a runaway
-argument that might be the root of the problem. But if
-your `}' was spurious, just type `2' and it will go away.
-Runaway argument?
-! Paragraph ended before \UTFviii at two@octets was complete.
-<to be read again> 
-                   \par 
-l. ...    }
-I suspect you've forgotten a `}', causing me to apply this
-control sequence to too much text. How can we recover?
-My plan is to forget the whole thing and hope for the best.
 The token list contains the tokens:
->  \par (control sequence=\par).
+>  ^^e7 (the character ^^e7).
 <recently read> }
 l. ...    }
-! Argument of \UTFviii at two@octets has an extra }.
-<inserted text> 
-                \par 
-l. ...    }
-I've run across a `}' that doesn't seem to match anything.
-For example, `\def\a#1{...}' and `\a}' would produce
-this error. If you simply proceed now, the `\par' that
-I've just inserted will cause me to report a runaway
-argument that might be the root of the problem. But if
-your `}' was spurious, just type `2' and it will go away.
-Runaway argument?
-! Paragraph ended before \UTFviii at two@octets was complete.
-<to be read again> 
-                   \par 
-l. ...    }
-I suspect you've forgotten a `}', causing me to apply this
-control sequence to too much text. How can we recover?
-My plan is to forget the whole thing and hope for the best.
 The token list contains the tokens:
->  \par (control sequence=\par).
+>  ^^c7 (the character ^^c7).
 <recently read> }
 l. ...    }
-! Argument of \UTFviii at two@octets has an extra }.
-<inserted text> 
-                \par 
-l. ...    }
-I've run across a `}' that doesn't seem to match anything.
-For example, `\def\a#1{...}' and `\a}' would produce
-this error. If you simply proceed now, the `\par' that
-I've just inserted will cause me to report a runaway
-argument that might be the root of the problem. But if
-your `}' was spurious, just type `2' and it will go away.
-Runaway argument?
-! Paragraph ended before \UTFviii at two@octets was complete.
-<to be read again> 
-                   \par 
-l. ...    }
-I suspect you've forgotten a `}', causing me to apply this
-control sequence to too much text. How can we recover?
-My plan is to forget the whole thing and hope for the best.
 The token list contains the tokens:
->  \par (control sequence=\par).
+>  ^^e7 (the character ^^e7).
 <recently read> }
 l. ...    }
-! Argument of \UTFviii at two@octets has an extra }.
-<inserted text> 
-                \par 
-l. ...    }
-I've run across a `}' that doesn't seem to match anything.
-For example, `\def\a#1{...}' and `\a}' would produce
-this error. If you simply proceed now, the `\par' that
-I've just inserted will cause me to report a runaway
-argument that might be the root of the problem. But if
-your `}' was spurious, just type `2' and it will go away.
-Runaway argument?
-! Paragraph ended before \UTFviii at two@octets was complete.
-<to be read again> 
-                   \par 
-l. ...    }
-I suspect you've forgotten a `}', causing me to apply this
-control sequence to too much text. How can we recover?
-My plan is to forget the whole thing and hope for the best.
 The token list contains the tokens:
->  \par (control sequence=\par).
+>  ^^c7 (the character ^^c7).
 <recently read> }
 l. ...    }
 ! Package inputenc Error: Invalid UTF-8 byte "84.
@@ -850,7 +778,7 @@ or specify an encoding such as \usepackage [latin1]{inputenc}
 in the document preamble.
 Alternatively, save the file in UTF-8 using your editor or another tool
 The token list contains the tokens:
->  q (the letter q).
+>  q (the character q).
 <recently read> }
 l. ...    }
 The token list contains the tokens:
@@ -858,7 +786,7 @@ The token list contains the tokens:
 <recently read> }
 l. ...    }
 The token list contains the tokens:
->  q (the letter q).
+>  q (the character q).
 <recently read> }
 l. ...    }
 The token list contains the tokens:





More information about the latex3-commits mailing list