[texhax] unicode
William F. Adams
wadams at atlis.com
Wed Aug 3 14:43:45 CEST 2005
On Aug 3, 2005, at 3:39 AM, Alexander Grahn wrote:
> I will give the ucs-package a try. My computer has not been generally
> unicode
> enabled. Therefore, original strings are ordinary (8 bit?)-ASCII.
only if you're using some kind of 8-bit
\usepackage[8-bit-encoding-foo]{inputenc} line in your preamble.
> I found an example PDF-file which suits my needs. At one position
> therein
> the string appears as
>
> /T (somestring)
>
> and at another as
>
> [(^@s^@o^@m^@e^@s^@t^@r^@i^@n^@g) 10 0 R ...]
>
> if I open the file in the Vim editor.
>
> The first occurence is obviously plain ASCII and the second one Unicode
> (the PDF-specification 1.6 is saying this).
>
> If, for example, I define a string
> as
>
> \def\mystring{^@C^@a^@r^@l}
>
> TeX complains:
>
> ! Text line contains an invalid character.
> l.8 \def\mystring{^^@
> C^^@a^^@r^^@l}
>
> Maybe the ucs-package helps to properly escape the nonprintable
> characters. Nevertheless, I must get them somehow into the PDF
> eventually.
\def\mystring{^@C^@a^@r^@l} handles it literally, and you've not
changed the catcode of ^ so that it doesn't have a special meaning.
You may be able to do this sort of thing w/ a pdfliteral (check the
pdftex docs), but may need to be using dvipdfmx and appropriate
packages if you need a .dvi.
William
--
William Adams, publishing specialist
voice - 717-731-6707 | Fax - 717-731-6708
www.atlis.com
More information about the texhax
mailing list