[latex3-commits] [git/LaTeX3-latex3-latex3] master: Use Lua's builtin utf8 library if available (594215c18)

Marcel Fabian Krüger tex at 2krueger.de
Fri Jan 24 02:15:07 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/594215c18769d9628c21009ee396c485144e7291

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

commit 594215c18769d9628c21009ee396c485144e7291
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Fri Jan 24 02:13:37 2020 +0100

    Use Lua's builtin utf8 library if available


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

594215c18769d9628c21009ee396c485144e7291
 l3kernel/l3luatex.dtx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/l3kernel/l3luatex.dtx b/l3kernel/l3luatex.dtx
index 76e8fbf10..26455c004 100644
--- a/l3kernel/l3luatex.dtx
+++ b/l3kernel/l3luatex.dtx
@@ -354,9 +354,10 @@ local write      = tex.write
 local write_nl   = texio.write_nl
 %    \end{macrocode}
 %
-%   Newer Con\TeX{}t releases replace the |unicode| library by |utf|.
+%   Newer Con\TeX{}t releases replace the |unicode| library by |utf| and
+%   since Lua 5.3 we can even use the Lua standard |utf8| library.
 %    \begin{macrocode}
-local utf8_char = (utf and utf.char) or unicode.utf8.char
+local utf8_char = (utf8 and utf8.char) or (utf and utf.char) or unicode.utf8.char
 %    \end{macrocode}
 %
 %   Deal with Con\TeX{}t: doesn't use |kpse| library.





More information about the latex3-commits mailing list