Problems caused in Lua programs by setting LC_{CTYPE, COLLATE, NUMERIC} to C
Today I noticed that my Compose key did not seem to be working in my PDF viewer (Evince on GNOME). On investigation, this turned out to be a problem with the texdoc command, and specifically, that texlua changes the environment variables LC_CTYPE, LC_COLLATE and LC_NUMERIC. In this particular case, I think running a more recent version of LuaTeX would suffice (I have 0.80), as texdoc tries to reset LC_CTYPE before running external commands (and it turns out that this is the setting that causes my problem), but a comment in the current (version 2.017) version of texdoc says: In older versions of luatex, status.lc_* will be nil. For now, I've simply patched texdoc to set LC_CTYPE to the empty string. However, this sort of problem could still occur with functionality of programs started by texdoc that relies on LC_COLLATE or LC_NUMERIC, and further, it can affect any program run with texlua that starts other external programs or uses locale-dependent functionality. Therefore, I wonder whether it would be possible to have an easy way to undo or prevent this environment change? The most obvious way would be not to change the environment when the executable is run as "texlua". Relatedly, I have a bug fix for texdoc; is this the right place to send it? -- https://rrt.sc3d.org
participants (1)
-
Reuben Thomas