[latex3-commits] [git/LaTeX3-latex3-latex3] unicode-data: \codepoint_generate:nn can't use #2 with 8-bit engines (0083df30e)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Oct 12 09:05:29 CEST 2022


Repository : https://github.com/latex3/latex3
On branch  : unicode-data
Link       : https://github.com/latex3/latex3/commit/0083df30ea86a8c1528a90b9693e42d6ac0fd203

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

commit 0083df30ea86a8c1528a90b9693e42d6ac0fd203
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Oct 12 08:05:07 2022 +0100

    \codepoint_generate:nn can't use #2 with 8-bit engines
    
    As the 'source' codepoint could be out of the ASCII range even
    if the 'target' is not.


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

0083df30ea86a8c1528a90b9693e42d6ac0fd203
 l3kernel/l3unicode.dtx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/l3kernel/l3unicode.dtx b/l3kernel/l3unicode.dtx
index 9c99eddce..e3c8b087c 100644
--- a/l3kernel/l3unicode.dtx
+++ b/l3kernel/l3unicode.dtx
@@ -80,9 +80,9 @@
 %   produced: these will be the bytes of the UTF-8 representation of the
 %   \meta{codepoint}. For all codepoints outside of the classical ASCII
 %   range, the generated character tokens will be active (category code
-%   $13$); the \meta{catcode} argument is only used for codepoints in the
-%   ASCII range. To allow the result of this function to be used inside a
-%   expansion context, the result is protected by \cs{exp_not:n}.
+%   $13$); for codepoints in the ASCII range, the prevailing category code of
+%   the character is used. To allow the result of this function to be used
+%   inside a expansion context, the result is protected by \cs{exp_not:n}.
 % \end{function}
 %
 % \begin{function}[EXP, added = 2022-10-09]
@@ -206,7 +206,7 @@
             \int_compare:nNnTF {#1} < { "80 }
               {
                 \__kernel_exp_not:w \exp_after:wN \exp_after:wN \exp_after:wN
-                  { \char_generate:nn {#1} {#2} }
+                  { \char_generate:nn {#1} { \char_value_catcode:n {#1} } }
               }
               {
                 \use:e





More information about the latex3-commits mailing list.