[Python-ideas] PEP 540: Add a new UTF-8 mode
Barry Warsaw
barry at python.org
Fri Jan 6 19:06:23 EST 2017
On Jan 06, 2017, at 11:33 PM, Victor Stinner wrote:
>Barry: About chroot, why do you get a C locale? Is it because no
>locale is explicitly configured? Or because no locale is installed in
>the chroot?
For some reason it's not configured:
% schroot -u root -c sid-amd64
(sid-amd64)# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
(sid-amd64)# export LC_ALL=C.UTF-8
(sid-amd64)# locale
LANG=
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
I'm not sure why that's the default inside a chroot. I thought there was a
bug or discussion about this, but I can't find it right now.
Generally when this happens, exporting this environment variable in your
debian/rules file is the way to work around the default.
Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170106/06913139/attachment.sig>
More information about the Python-ideas
mailing list