[latex3-commits] [git/LaTeX3-latex3-hyperref] master: correct unicode setup, manual, update test (1dd5b77)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Feb 4 11:59:44 CET 2021


Repository : https://github.com/latex3/hyperref
On branch  : master
Link       : https://github.com/latex3/hyperref/commit/1dd5b77f30f415885cee3c18bea390b81442fadb

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

commit 1dd5b77f30f415885cee3c18bea390b81442fadb
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Nov 16 09:05:14 2020 +0100

    correct unicode setup, manual, update test


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

1dd5b77f30f415885cee3c18bea390b81442fadb
 doc/manual.tex                   | 13 ++++-----
 hyperref.dtx                     |  4 +--
 testfiles-xetex/unicode-test.tpf | 58 +++++++++++++++++++++++-----------------
 3 files changed, 43 insertions(+), 32 deletions(-)

diff --git a/doc/manual.tex b/doc/manual.tex
index c63db71..0187693 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -1955,10 +1955,11 @@ sequence error would arise.
  \item \xoption{unicode} sets Unicode. It is encoded as UTF-16BE. Two bytes
     are used for most characters, surrogates need four bytes.
  \item \xoption{auto} PDFDocEncoding if the string does not contain characters
-    outside the encoding and Unicode otherwise.
+    outside the encoding (outside ascii if an unicode engine is used)
+    and Unicode otherwise. 
 \end{itemize}
 
- The luatex driver uses \xoption{unicode} by default. If another encoding should be forced,
+ All drivers use \xoption{unicode} by default now. If another encoding should be forced,
  it should be done in \verb|hypersetup|.
 
 \subsection{Color options/package hycolor}
@@ -2978,11 +2979,11 @@ For equations the following might work:
 
 \subsubsection{XeTeX}
 
- Default for the encoding of bookmarks is `pdfencoding=auto'.
+ Default for the encoding of bookmarks is \verb|pdfencoding=unicode|.
  That means the strings are always treated as unicode strings.
- Only if the string restricts to the printable ASCII set,
-  it is written as ASCII string. The reason is that the
-  \verb|\special| does not support PDFDocEncoding.
+ If \verb|auto| or \verb|pdfdoc| is forced it applies only
+ if the string restricts to the printable ASCII set,
+ The reason is that the \verb|\special| does not support PDFDocEncoding.
 
  In older versions hyperref contained special conversion code from
  UTF-16BE back to UTF-8 in a number of places for
diff --git a/hyperref.dtx b/hyperref.dtx
index 81474a1..f2e3884 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -1870,7 +1870,7 @@
         \ltx at IfUndefined{StringEncodingConvertTest}{%
         }{%
           \EdefUnescapeString\HyPsd at temp#1%
-          \ifxetex
+          \iftutex
             \let\HyPsd at UnescapedString\HyPsd at temp
             \StringEncodingConvertTest\HyPsd at temp\HyPsd at temp
                                       {utf16be}{ascii-print}{%
@@ -5025,7 +5025,7 @@
 %    \end{macrocode}
 % change 2020-08-14, use unicode by default:
 %    \begin{macrocode}
-\let\HyPsd at pdfencoding\Hy at pdfencoding@unicode
+\let\HyPsd at pdfencoding\HyPsd at pdfencoding@unicode
 \HyPsd at LoadUnicode
 \def\HyPsd at LoadStringEnc{%
   \RequirePackage{stringenc}[2009/12/15]%
diff --git a/testfiles-xetex/unicode-test.tpf b/testfiles-xetex/unicode-test.tpf
index ccf9ba9..943a49a 100644
--- a/testfiles-xetex/unicode-test.tpf
+++ b/testfiles-xetex/unicode-test.tpf
@@ -62,7 +62,7 @@ endobj
 <</Type/Pages/Count 1/Kids[3 0 R]/MediaBox[0 0 612 792]>>
 endobj
 2 0 obj
-<</Creator(TeX)/Title(abc)/Author<feff0047007200fc00df006565e99910d83edd86>/Producer(xdvipdfmx)/CreationDate(D:20160520090000-00'00')>>
+<</Creator(TeX)/Title<feff006100620063>/Author<feff0047007200fc00df006565e99910d83edd86>/Producer(xdvipdfmx)/CreationDate(D:20160520090000-00'00')>>
 endobj
 1 0 obj
 <</OpenAction[3 0 R/Fit]/PageMode/UseOutlines/AcroForm 13 0 R/Names 19 0 R/Outlines
@@ -125,19 +125,27 @@ end
 endstream
 endobj
 27 0 obj
-<</Subtype/CIDFontType0C/Length 880>>
+<</Subtype/CIDFontType0C/Length 889>>
 [BINARY STREAM]
 endobj
 28 0 obj
 [28[547]35[625]43[500]82[563]]
 endobj
-30 0 obj
-<</Subtype/CIDFontType0C/Length 929>>
+29 0 obj
+<</Length 11>>
 [BINARY STREAM]
 endobj
 31 0 obj
+<</Subtype/CIDFontType0C/Length 934>>
+[BINARY STREAM]
+endobj
+32 0 obj
 [28[500]35[556]43[444]82[500]]
 endobj
+33 0 obj
+<</Length 11>>
+[BINARY STREAM]
+endobj
 5 0 obj
 <</Type/Font/Subtype/CIDFontType0/BaseFont/EXQIVM+LMRoman12-Bold/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
 0>>/FontDescriptor 26 0 R/DW 280/W 28 0 R>>
@@ -145,7 +153,7 @@ endobj
 26 0 obj
 <</Type/FontDescriptor/Ascent 806/Descent -194/StemV 109/CapHeight 806/AvgWidth 618/FontBBox[-476
 -289 1577 1137]/ItalicAngle 0/Flags 262150/Style<</Panose<000000000800000000000000>>>/FontName/EXQIVM+LMRoman12-Bold/FontFile3
-27 0 R>>
+27 0 R/CIDSet 29 0 R>>
 endobj
 4 0 obj
 <</Type/Font/Subtype/Type0/BaseFont/EXQIVM+LMRoman12-Bold-Identity-H/Encoding/Identity-H/DescendantFonts[5 0 R]/ToUnicode
@@ -153,27 +161,27 @@ endobj
 endobj
 7 0 obj
 <</Type/Font/Subtype/CIDFontType0/BaseFont/XUUPUX+LMRoman10-Regular/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
-0>>/FontDescriptor 29 0 R/DW 280/W 31 0 R>>
+0>>/FontDescriptor 30 0 R/DW 280/W 32 0 R>>
 endobj
-29 0 obj
+30 0 obj
 <</Type/FontDescriptor/Ascent 806/Descent -194/StemV 69/CapHeight 806/AvgWidth 549/FontBBox[-430
 -290 1417 1127]/ItalicAngle 0/Flags 6/Style<</Panose<000000000500000000000000>>>/FontName/XUUPUX+LMRoman10-Regular/FontFile3
-30 0 R>>
+31 0 R/CIDSet 33 0 R>>
 endobj
 6 0 obj
 <</Type/Font/Subtype/Type0/BaseFont/XUUPUX+LMRoman10-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[7 0 R]/ToUnicode
 25 0 R>>
 endobj
 xref
-0 32
+0 34
 0000000000 65535 f 
-0000002713 00000 n 
+0000002726 00000 n 
 0000002562 00000 n 
 0000002396 00000 n 
-0000006223 00000 n 
-0000005787 00000 n 
-0000006805 00000 n 
-0000006369 00000 n 
+0000006384 00000 n 
+0000005934 00000 n 
+0000006980 00000 n 
+0000006530 00000 n 
 0000000650 00000 n 
 0000001930 00000 n 
 0000000357 00000 n 
@@ -190,17 +198,19 @@ xref
 0000002216 00000 n 
 0000002488 00000 n 
 0000002371 00000 n 
-0000002847 00000 n 
-0000003292 00000 n 
-0000005973 00000 n 
-0000003740 00000 n 
-0000004692 00000 n 
-0000006558 00000 n 
-0000004739 00000 n 
-0000005740 00000 n 
+0000002860 00000 n 
+0000003305 00000 n 
+0000006120 00000 n 
+0000003753 00000 n 
+0000004714 00000 n 
+0000004761 00000 n 
+0000006719 00000 n 
+0000004821 00000 n 
+0000005827 00000 n 
+0000005874 00000 n 
 trailer
 <</ID[<ID-STRING><ID-STRING>]/Root
-1 0 R/Info 2 0 R/Size 32>>
+1 0 R/Info 2 0 R/Size 34>>
 startxref
-6954
+7129
 %%EOF





More information about the latex3-commits mailing list.