[Dev-luatex] Unicode in \pdfinfo

Hans Hagen pragma at wxs.nl
Tue Jul 1 12:58:40 CEST 2008


David Kastrup wrote:
> Hans Hagen <pragma at wxs.nl> writes:
> 
>> Jonathan Sauer wrote:
>>> Hello, 
>>>
>>>> slightly more efficient ... (char and byte accept multiple 
>>>> arguments) and you can use write which is faster too)
>>> Thanks!
>>>
>>>> in context i use something quick and dirty (no > 0x10000 
>>>> checking but from your function i can deduce the magic umbers -)
>>> Well, they are simply the ones mentioned in
>>> http://en.wikipedia.org/wiki/Utf-16.
>> sure, but i didn't realize that a simple / worked ok; trunc/round stuff 
>> and so
> 
> Oh, it doesn't work.  It is the %04x which does the truncation.  %04.0f
> in contrast rounds.
> 
> No idea whether this is documented/intended behavior.

i wonder too (format is not that well documented, mostly a reference to 
some c function); last week i found out that %4s works but also %-4s
which was just a guess when i tried it -)

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
-----------------------------------------------------------------


More information about the dev-luatex mailing list