[latex3-commits] [git/LaTeX3-latex3-hyperref] newpdfstringdef: handle luatex bug with fffd and greek active shorthand (61d489a)

Ulrike Fischer fischer at troubleshooting-tex.de
Sat Aug 13 02:56:18 CEST 2022


Repository : https://github.com/latex3/hyperref
On branch  : newpdfstringdef
Link       : https://github.com/latex3/hyperref/commit/61d489aa26f8e900444ed0e9da8bb0d73be8528c

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

commit 61d489aa26f8e900444ed0e9da8bb0d73be8528c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Aug 13 02:56:18 2022 +0200

    handle luatex bug with fffd and greek active shorthand


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

61d489aa26f8e900444ed0e9da8bb0d73be8528c
 new-pdfstring.sty | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/new-pdfstring.sty b/new-pdfstring.sty
index f4f03e3..a2be7d1 100644
--- a/new-pdfstring.sty
+++ b/new-pdfstring.sty
@@ -157,6 +157,7 @@
     \let\@protected at testopt\HyPsd at protected@testopt
     \let\@protected at testopt@xargs\HyPsd at protected@testopt
     \begingroup
+      \HyPsd at fix@shorthands
       \let\GenericError\@gobblefour
       \let\GenericWarning\@gobbletwo
       \let\GenericInfo\@gobbletwo
@@ -344,11 +345,20 @@
       }
   }
 
+\sys_if_engine_luatex:TF
+ {\def\HyPsd at UnicodeReplacementCharacter{⍰}}
+ {\def\HyPsd at UnicodeReplacementCharacter{\HyPsd at unichar{"FFFD}}}
+
+
+\def\HyPsd at fix@shorthands
+ {
+   %greek makes this an active char and that gives continuation errors in utf8
+   \tl_set:cx{normal at char\char_generate:nn{159}{12}}{\char_generate:nn{159}{12}}
+ }
 
 \ExplSyntaxOff
 
 
-\def\HyPsd at UnicodeReplacementCharacter{�}
 
 \def\HyPsd at DieFaceLarge{\ERROR}
 \def\HyPsd@@ding#1!{\ERROR}





More information about the latex3-commits mailing list.