[Dev-luatex] Unicode in \pdfinfo

Heiko Oberdiek oberdiek at uni-freiburg.de
Tue Jul 1 13:10:25 CEST 2008


On Tue, Jul 01, 2008 at 11:31:15AM +0200, Hans Hagen wrote:

> in pdf traditionally a string (that is, the ones that represented 
> bookmarks and such) were in pdf doc encoding, so
> 	(pdfdoc encoded string)
> then they added utf16 support
> 	(utf16bom followed by utf16 sequence
> that's still strings. However, at some point another notation was 
> introduced:
> 	<hex sequence>
> which again is utf16 

or a string using PDFDocEncoding. The <> notation can be used
anywhere, where a PDF string is expected regardless of the encoding.

> but this time hex encoded (less efficient but so 
> seldom used that it does not really matter)

Not to forget: Some characters inside (...) need to be escaped
(`\', unmatched `(' and `)', line ends, ...)

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

PS: Regarding encodings: hyperref has an undocumented option
    Then the bookmark string is converted to Unicode
    (larger range of possible characters). Then hyperref
    tries a conversion to PDFDocEncoding (via package stringenc).
    Depending on the success, the bookmark string is then stored
    in PDFDocEncoding if possible and in Unicode otherwise.

More information about the dev-luatex mailing list