在 2021/10/25 上午12:35, Felix Lechner 写道:
With a Chinese default locale, you probably have a lot more experience
with all this, but I do not understand. Lintian does not use
en_US.UTF-8 but C.UTF-8. [1]

I can reproduce this bug in my test server.

My notebook use zh_CN.UTF-8 locale, ssh to the test server.

1. The test server has not any other locale except default.
2. I also already apt purge locale package on test server.
3. The ssd_config of the test server has the following config to accept my 
notebook locale zh_CN.UTF-8
:

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

----------------------------------------------------------------------------

atzlinux@hwymini:~$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX

atzlinux@hwymini:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_CN.UTF-8
LANGUAGE=
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

atzlinux@hwymini:~$ LC_ALL=C.UTF-8

atzlinux@hwymini:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=zh_CN.UTF-8
LANGUAGE=
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

atzlinux@hwymini:~$ MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z 
/usr/share/man/man1/ls.1.gz > /dev/null
man: can't set the locale; make sure $LC_* and $LANG are correct
--------------------------------
The same error infos display.

--------------------------------
atzlinux@hwymini:~$ export LC_ALL=C.UTF-8
atzlinux@hwymini:~$ locale
LANG=zh_CN.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=C.UTF-8

atzlinux@hwymini:~$ MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z 
/usr/share/man/man1/ls.1.gz > /dev/null
atzlinux@hwymini:~$
---------------------------------
There is not errors after export.

So,my question is: Is the "LC_ALL=C.UTF-8" export to forked bash child process 
that run man check?

--------
BTW, "You could not reproduce the error in Docker locally with the Salsa CI Lintian 
image—and your host uses the default locale|en_US.UTF-8|. "

I think is that the screen output of console running Docker inherit 
the|en_US.UTF-8|  locale from your host, you may run locale to see the LANG in 
Docker. Is it|en_US.UTF-8|?

I guess the Dcoker can use|en_US.UTF-8|  locale come from your host, even the 
Docker itself has not the|en_US.UTF-8|  locale produced.

Thanks!

xiao sheng wen

Attachment: OpenPGP_0x00186602339240CB.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to