On 14/02/2024 23:11, Franco Martelli wrote:
Well, I'll go with env command syntax for shells portability. I was asking this because I want to suggest a change to the DDP (Debian Documentation Project) members for the releases notes documentation ยน

# env LC_ALL=C script -t 2>~/upgrade-bookwormstep.time -a ~/upgrade-bookwormstep.script

Perhaps LC_ALL=C.UTF-8 is safer. At least several years ago some python scripts (unrelated to Debian upgrade however) failed trying to log e.g. non-ascii file paths, etc.

I would reset LANGUAGE as well otherwise some programs may use localized messages.

Finally, some users might have LC_ALL (despite it is not recommended) or LANGUAGE set in a file like ~/.bashrc. That is why the following approach may be more reliable. Run commands within the "script" session

    LANG=C.UTF-8; LANGUAGE=; export LANG LANGUAGE

with a note concerning csh. To affect messages generated by shell itself, "export" is separated from setting of the variables.

Reply via email to