1 Jul
2008
1 Jul
'08
8:38 a.m.
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.
function pdf.hexify(str) texwrite("feff") for b in str:utfvalues() do texwrite(("%04x"):format(b)) end end
\pdfinfo{/Title(\directlua0{pdf.hexify<'my title'>})}
so <> instead of () as string delimiter
How does that work? Jonathan