Thanks Hans,
 
It works. But only the /Contents part was converted correctly, the /T part is still not so good. So I redefined your \doPDFinsertcomment macro and changed the third line from
========================
   \doifelsenothing{#1}
     {\let\PDFidentifier\empty}
     {\def\PDFidentifier{/T (#1)}}%
========================
to
========================
   \doifelsenothing{#1}
     {\let\PDFidentifier\empty}
     {\sanitizePDFencoding#1\to\PDFcommenttitle\def\PDFidentifier{/T \ifPDFunicode <\PDFcommenttitle>\else (\PDFcommenttitle)\fi}}%
========================
 
Now it's OK for me. I hope there's a more clever way that I don't need to copy such long codes to my source file.
 
 
On 4/17/07, Hans Hagen <pragma@wxs.nl> wrote:
Zhichu Chen wrote:
> Hi
>
> I've been looking at some core codes and the PDF reference, still have no
> idea.
>
> Somehow, I was told that LaTeX can do such things using "hyperref"
> package
> and \pdfstringdef\temp{???}, then \pdfannot{... /Contents(\temp) ...}
> should
> be OK.
>
can you try

\PDFunicodetrue

Hans



-----------------------------------------------------------------
                                         Hans Hagen | PRAGMA ADE
             Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                            | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



--
Sincerely yours,
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
----------------------------------------------------------------