[pdftex] Re: [Cjk] Conflict between pinyin and pifont?(About CJKbookmarks)

Werner LEMBERG wl at gnu.org
Thu Feb 16 01:58:25 CET 2006


>   Under this situation, pdf outline will lost 0xFEFF(BOM) and it will
>   be UTF-8 hexadecimal if I use \texorpdfstring.
> 
>   http://edt1023.sayya.org/tex/tmp/utf8bks0.tar.gz

Here is my solution to make hyperref directly emit UTF-16BE bookmarks.
Please note that the surrogate stuff isn't tested yet (there might be
errors which should be easy to fix nevertheless).

Attached is a simple input file CJKutf8-test.tex (using a traditional
Chinese font and T1) which can be directly processed with TeXLive
2005.  The attached CJKutf8.sty should be in the same directory as
CJKutf8-test.tex so that the old version (from TeXLive) is overridden.
Finally, the attached PDF shows the result.  As can be seen, the
handling of UTF8 is not restricted to the CJK ranges -- it properly
maps LaTeX macros (as defined in the .dfu files) also.


    Werner
-------------- next part --------------
\documentclass[12pt]{article}

\usepackage{CJKutf8}
\usepackage[T1]{fontenc}

\usepackage[unicode]{hyperref}


\begin{document}

\begin{CJK}{UTF8}{bsmi}
  \section{f\"o\v{c} ? b\`a\v{r}}

  ?
\end{CJK}

\end{document}

%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% TeX-master: t
%%% End:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CJKutf8.sty.bz2
Type: application/octet-stream
Size: 2049 bytes
Desc: not available
Url : http://tug.org/pipermail/pdftex/attachments/20060216/ba83463e/CJKutf8.sty-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CJKutf8-test.pdf
Type: application/pdf
Size: 20778 bytes
Desc: not available
Url : http://tug.org/pipermail/pdftex/attachments/20060216/ba83463e/CJKutf8-test-0001.pdf


More information about the pdftex mailing list