I am writing some functions to manipulate strings. A typical way to produce a character with a given character code is the \lowercase
primitive. The following code produces a character with code 234, and displays it to the terminal.
\lccode`*=234
\lowercase{\message{*}}
If I replace 234
by 345
above, then pdfTeX raises an error: Invalid code (345), should be in the range 0..255.
On the other hand, LuaTeX and XeTeX are happy up to 1114111
, as expected from a Unicode-compliant engine.
Now, I want my macros to be as robust as possible. Is it always true that the maximum lccode is 255 in pdfTeX and 1114111 in LuaTeX and XeTeX? Or can a user prevent in any way the engine from using the full range, hence confusing my macros?
\XeTeXinputencoding
that does a conversion of the input into Unicode, but that's all; when a character enters XeTeX it's changed into its Unicode correspondent in a way similar to the^^
and^^^^
conventions: the mouth will act on the changed character and so\lowercase
and\uppercase
need the whole set.pdftex
andpdfetex
, where the former disables some commands.)\char now accepts values between 0 and 1114111
and extends this statement to the other similar commands like\lccode
. As far as I know this is true in xetex too. (But the etex extension can be disabled in both engines).