[tex-live] packages with characters > 127

Jonathan Kew jfkthame at googlemail.com
Sat Jan 2 02:01:57 CET 2010


On 2 Jan 2010, at 00:04, Manuel Pégourié-Gonnard wrote:

> Zdenek Wagner a écrit :
>> If I were the author I would not agree. Using ^^ is nothing but a
>> cryptic way of reaching the same result.
> 
> I have to disagree on this point.
> 
> \catcode`\£=13 \def£{something}
> 
> produces a compile error with both XeTeX and LuaTeX, while
> 
> \catcode`\^^a3=13 \def^^a3{something}
> 
> works fine with both.

Exactly. This is why such changes are helpful -- I dealt with a few cases back in the much earlier days of xetex (url.sty comes to mind as a package that I remember was affected).

The explanation, in case it's not obvious, is that a ^^ sequence such as ^^a3 is converted during input scanning directly to the *Unicode character code* U+00A3 within xetex (and similarly, I assume, for luatex). It is *not* converted to a byte code which is then subject to codepage or encoding form conversion.

Therefore, it is significantly different from encountering the *byte* 0xA3 within the input data, in which case UTF-8 conversion will be applied (and will fail, in this example).

In other words, ^^ forms represent character codes, not bytes. That's why it makes sense to allow them to extended to ^^^321, ^^^^abcd, or even ^^^^^^101234, etc.

JK



More information about the tex-live mailing list