[tex-k] \write writes out TeX's `^^' quartets instead of 8-bit chars

geolsoft at mail.ru geolsoft at mail.ru
Wed Aug 18 18:57:30 CEST 2004


Dear tex-k team,

I failed to locate any information on the problem I have, so I decided to seek
assistance from people in the know.  Maybe one of you will be so kind and look
at it.

Some time ago, I used teTeX 1.0.7, Web2C 7.3.7.  I had an application where I
was writing some 8-bit characters to an output file using \write (these were
actually Cyrillic chars from the extended ASCII, but that does not really matter
in this context).  The 8-bit characters were written out `as is'.  Then I used
an external program to do some processing on the output file before reading it
back in.

A few months ago I upgraded to teTeX 2.0.2, Web2C 7.4.5 (Debian GNU/Linux
2004-04-02 Sid).  I was in for a big surprise:  now \write would write out TeX's
`^^' quartets (such as `^^a8') instead of the 8-bit chars.  I did this from
plain TeX, no other macro packages were loaded.  Of course, my external program
failed, as it did not know anything about such special sequences.

By the way, not only my custom external program was affected.  Such behavior of
\write also prevented makeindex from correctly sorting index entries in Cyrillic
(I did give -L option to makeindex, and did set LC_COLLATE and LC_CTYPE
environment variables appropriately).

Of course, I could feed output file through sed and convert `^^' quartets back
into 8-bit chars, but that seems like brain damage to me.

Can anybody give me more information or maybe links to information on this
subject?  Was this new behavior of \write a bug or a feature?  Is this behavior
intended to stay?  Is it possible to re-enforce the old behavior?

Thanks in advance for enlightenment of a layman.


Best wishes,
Oleg Katsitadze



More information about the tex-k mailing list