[tex-live] locale dependent writing to log/terminal is *broken*

Petr Olsak petr at olsak.net
Mon Sep 22 10:39:33 CEST 2003



On Sat, 20 Sep 2003, Thomas Esser wrote:

> > I'm sorry, but I'm confused by your example.  If one uses a tcx file
> > that maps 0xa1 to 0x81, then why shouldn't TeX output ^^81?  Isn't that
> > exactly what it was told to do?
>
> If TeX would not consider all the locale stuff, it would finally call
> putc (Xchr (c)).  Olaf's intention was to make this depend on the locale,
> so that only those characters come to the terminal, that are printable.
>
> Obviously, the character to check is Xchr (c) and not c itself. That's all that
> I want to say. Simplifying the code, one could write the buggy stuff as
>
>   if isprint(c)
>     printf (Xchr (c))
>   else
>     "print c with ^^ notation"
>
> > Or are you saying that 0x81 should be "printable"?  I don't see how the
> > printability of 0xa1 enters into it.

I mean, that the is_printable vector have to be concerned to the internal
TeX encoding. In this case the function "isprint" from code above simply
asks if the "c" has positive value in is_printable vector.

The similar thinks are implemented in encTeX where is_printable vector is
named xprn vector. The relationship of this vector to the internal TeX
encoding (not to the input or output TeX encoding) is documented in
encTeX exactly. The reason is: one may set the xord/xchr vectors not
inverse each to other (for very special situations---this is possible
in encTeX) and the only fixed point is the TeX internal encoding
in such situations.

I mean that the bug was in TCX settings of is_printable vector, not in
interpretting of it. Moreower, the bug was that the TCX setting of
is_printable was not documented yet. My suggestion is of this
documateation is:

if
<input_code>  <tex_internal_code>
line occurs in TCX table then is_printable of <tex_internal_code>
is set to positive value.

This documentation will be harmony of the encTeX documentation and we will
not have an aditional incompatibility problem when encTeX will be
introduced.

Best regards

Petr Olsak




More information about the tex-live mailing list