[texhax] unicode

Alexander Grahn A.Grahn at fz-rossendorf.de
Thu Aug 4 11:56:58 CEST 2005

On Wed, Aug 03, 2005 at 10:01:32AM -0700, pierre.mackay wrote:
>Actually, both of them can be considered Unicode. The difference is that 
>one is stored in UTF8, which happens to be the same as 8-bit ASCII, and 
>the second is stored as 16-bit wide characters

Reading the PDF-spec I found out, that when they say `Unicode' they
indeed mean `UTF-16 Big Endian'. Hexdumping the PDF-example reveals that
there is simply a Zero-Byte in front of every ASCII character.

Therefore my problem can be boiled down to writing such a Zero-Byte into
the outputfile before each ASCII character. But I don't know how to do
this with TeX. I experimented with \char"00:


But if I open \outfile in a text editor I see:

  \char "00A\char "00B\char "00C

instead of the (non printable) null character followed by A, B or C.


More information about the texhax mailing list