[XeTeX] Unicode bookmarks in xdvipdfmx - prototype solution (long)

Timothy Eyre tinytim1234 at hotmail.com
Wed Jun 14 11:00:11 CEST 2006

>(a) Would it be harmful for this reencoding to be active in all cases?

According to the PDF spec, any text string can be given as plain ASCII or as 
FEFF followed by big-endian Unicode. Therefore, it should always be OK to 
always reencode.

The only glitch I foresee is when the document is encoded in something other 
than UTF-8. In that case the conversion won't work.

>(b) What would you think of using a command-line option to switch this 
>behavior on/off (if an "off" option is potentially needed),  rather than a 
>"dummy" \special?

I agree that a dummy \special is poor. The best way to present this to the 
user deserves some thought. I propose the following:

xdvipdfmx should do this new reencoding by default. The reencoding should be 
suppressed in the following cases:

- The document contains the tounicode: special;

- If the document uses an encoding other than UTF-8; and

- The user supplies a command-line switch to xdvipdfmx to say "please 
suppress bookmark reencoding".

More information about the XeTeX mailing list