From ea061adb20c4ae597923c35fa17dbd1a40874878 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 22 Dec 2006 01:30:06 +0000
Subject: hyperref update (22dec06)

git-svn-id: svn://tug.org/texlive/trunk@2841 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/hyperref/hyperref.dtx  | 77 +++++++++++++---------
 1 file changed, 46 insertions(+), 31 deletions(-)

(limited to 'Master/texmf-dist/source/latex/hyperref/hyperref.dtx')

diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
index 2769450701a..d83117dc5b7 100644
--- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
+++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx
@@ -37,7 +37,7 @@
 %<pd1enc>\ProvidesFile{pd1enc.def}
 %<puenc>\ProvidesFile{puenc.def}
 %<puvnenc>\ProvidesFile{puvnenc.def}
-%<!none>  [2006/11/30 v6.75h
+%<!none>  [2006/12/21 v6.75i
 %<package>  Hypertext links for LaTeX]
 %<nohyperref>  Dummy hyperref (SR)]
 %<driver>  Hyperref documentation driver file]
@@ -113,7 +113,7 @@
 \end{document}
 %</driver>
 % \fi
-% \CheckSum{19396}
+% \CheckSum{19423}
 %
 % \MakeShortVerb{|}
 % \StopEventually{}
@@ -3024,40 +3024,55 @@
   }%
 %    \end{macrocode}
 %
-%    Input encoding |utf8x| of package |ucs| uses macro
-%    \cmd{\unichar}. It takes a macro name as argument.
-%    Then name obeys the following structure:
-%\begin{verbatim}
-%\u8-<first byte as decimal number>-[continuation byte]+
-%\end{verbatim}
+%    Input encoding |utf8x| of package |ucs| uses macro \cmd{\unichar}.
+%    Values greater than |"FFFF| are not supported.
 %    \begin{macrocode}
-    \def\HyPsd@unichar#1{%
-      \expandafter\HyPsd@@unichar\string#1\@empty\@empty\@empty\@nil
-    }%
-    \def\HyPsd@@unichar #1-#2-#3#4#5#6\@nil{%
-      \ifnum#2>191 %
-        \ifnum#2<224 %
-          \expandafter\HyPsd@UTFviii@@two
-            \number\dimexpr.25\dimexpr#2sp\expandafter\relax\expandafter|%
-            \number#2\expandafter|%
-            \number\dimexpr.125\dimexpr`#3sp\expandafter\relax\expandafter|%
-            \number`#3 \@nil
+  \def\HyPsd@unichar#1{%
+    \ifHy@unicode
+      \ifnum#1>"FFFF %
+        \HyPsd@UnicodeReplacementCharacter % unsupported
+      \else
+        \ifnum#1>"7FF %
+          \9%
+          \expandafter\HyPsd@unichar@first@byte\expandafter{%
+            \number
+            \dimexpr.00390625\dimexpr\number#1sp\relax\relax
+          }%
         \else
-          \ifnum#2<240 %
-            \expandafter\HyPsd@UTFviii@@three
-              \number\dimexpr.25\dimexpr#2sp\expandafter\relax\expandafter|%
-              \number#2\expandafter|%
-              \number\ifnum\numexpr`#3-128\relax <32 0\else 1\fi\expandafter|%
-              \number\dimexpr.25\dimexpr`#3sp\expandafter\relax\expandafter|%
-              \number`#3\expandafter|%
-              \number\dimexpr.125\dimexpr`#4sp\expandafter\relax\expandafter|%
-              \number`#4 \@nil
-          \else
-            ?% unsupported
-          \fi
+          \8%
+          \number\dimexpr.00390625\dimexpr\number#1sp\relax\relax
         \fi
+        \expandafter\HyPsd@unichar@second@byte\expandafter{%
+          \number
+          \numexpr#1-256*\number
+              \dimexpr.00390625\dimexpr\number#1sp\relax\relax\relax
+        }%
       \fi
+    \else
+      .% unsupported (Unicode -> PDF Doc Encoding)
+    \fi
+  }%
+  \def\HyPsd@UnicodeReplacementCharacter{\9377\375}
+  \def\HyPsd@unichar@first@byte#1{%
+    \number\dimexpr.015625\dimexpr#1sp\relax\relax
+    \expandafter\HyPsd@unichar@octtwo\expandafter{%
+      \number
+      \numexpr#1-64*\number\dimexpr.015625\dimexpr#1sp\relax\relax\relax
+    }%
+  }%
+  \def\HyPsd@unichar@second@byte#1{%
+    \csname\number\dimexpr.015625\dimexpr#1sp\relax\relax\endcsname
+    \expandafter\HyPsd@unichar@octtwo\expandafter{%
+      \number
+      \numexpr#1-64*\number\dimexpr.015625\dimexpr#1sp\relax\relax\relax
     }%
+  }%
+  \def\HyPsd@unichar@octtwo#1{%
+    \number\dimexpr.125\dimexpr#1sp\relax\relax
+    \number\numexpr#1-8*\number\dimexpr.125\dimexpr#1sp\relax\relax\relax
+  }%
+%    \end{macrocode}
+%    \begin{macrocode}
 \fi
 %    \end{macrocode}
 %
-- 
cgit v1.2.3

