Locale problems

  • Done
  • quality assurance status badge
Details
4 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Marius Bakke
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal
D
D
Danny Milosavljevic wrote on 8 Dec 2018 22:35
(address . bug-guix@gnu.org)
20181208223551.2ad9c226@scratchpost.org
Can we do something against the locale problems that keep showing up
when updating?

Right now, after a half-finished update from guix master (half-finished because
once any package build breaks, the entire update will stop), I cannot use any
Umlauts because "xterm -u8" stops working as it should:
$ xterm -u8
Warning: locale not supported by C library, locale unchanged
$

Why does this keep happening? Shouldn't the functional nature and modularity
of Guix keep using the old locales where those make sense and the new locales
where those make sense?

Environment:

$ 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
POSIX
$ echo $LC_ALL
de_DE.utf8
$ echo $LANG
en_US.utf8
$ echo $GUIX_LOCPATH
/run/current-system/locale
$ ls $GUIX_LOCPATH/2.28/en_US.utf8/
LC_ADDRESS LC_IDENTIFICATION LC_MONETARY LC_PAPER
LC_COLLATE LC_MEASUREMENT LC_NAME LC_TELEPHONE
LC_CTYPE LC_MESSAGES LC_NUMERIC LC_TIME
$ ls xxx
ls: Zugriff auf 'xxx' nicht möglich: Datei oder Verzeichnis nicht gefunden
$
^^ Note: Message is in German, as it should. I left in the mangled Umlauts
for documentation purposes.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlwMOTcACgkQ5xo1VCww
uqXmCwf9FCxcqZ1dByCkIH1+HXKWHIRXO4s7zVxygab5PZdsAeCmhMVtxx6womOw
f5jkJReX+D3Q9lse4bk/ZZfeabCrAmIl+0IdsaI2WF4DK1zTkJDLS3dmdGAz9Hye
UnefJFTQo7P4gHgkMcPcQXzcYUsDs0stZCjb3A0cMx463sJpMq4vlQnHmozpWYe4
0Uf2Ed7MLdyivksszbCiC1gPTX67gMFB7yqvKXqfjuau4vaM2SA2LP0QGFdv2HBE
ZMMB9hXOUvoipQKHLJaLj1kmwty9r9IdqhZS4atTWedrL5Lw4hLcBtWoWJ5ND+jU
2a04Odlira8eofzP5MH+h40E2e47GQ==
=YgTU
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 8 Dec 2018 23:35
(address . 33678@debbugs.gnu.org)
20181208233509.79aaf59d@scratchpost.org
(Aha, updating just xterm fixes the problem).

When locales don't work, I can't enter umlauts at all - they get replaced by a
"generic" character that isn't an umlaut, even when checked using a hexdump
tool.

So not only couldn't I see the umlauts, I couldn't type them blindly either.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlwMRx0ACgkQ5xo1VCww
uqUBfAf+Kf/94iwzPrjBNj21/bqB2lVHwTV2JqjRFsnbMDmm0csPz87CfC/ZdRnb
A3I2OgJwVXDetflkiuy4bS3KYzjQq/cKguP/WZxg8zoS7dIB+3btPjyUnhqrvnvi
Es3kvBGRWOdqQOSZd3ArRMYGbTjXsgu0x/K4fhhtPXjc15hp79P34G2OoPJZTpPD
e4hOBVMwo6Akud1kW/3Zrj5FooQPN2iZABfI4uZI87ypdcMF89FPiJqWXd7yh8gm
pUu+ZkPvQuJ8Ni84DdzvoZHMRFRuP5KV8OOwPafWCuyULRzXVk5dkY8sfM1uOKOC
oVGMoNBBux2PVtRL0Ppw0X1hfgaQOA==
=mIcz
-----END PGP SIGNATURE-----


M
M
Marius Bakke wrote on 8 Dec 2018 23:56
87va43sk4n.fsf@fastmail.com
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (8 lines)
> (Aha, updating just xterm fixes the problem).
>
> When locales don't work, I can't enter umlauts at all - they get replaced by a
> "generic" character that isn't an umlaut, even when checked using a hexdump
> tool.
>
> So not only couldn't I see the umlauts, I couldn't type them blindly either.

Does adding locales for both the new and old libc to your system help?

E.g.:

(operating-system
[...]
(locale-libcs (list glibc-2.27 (canonical-package glibc))))

?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlwMTBkACgkQoqBt8qM6
VPqWhAgA0IyCuBwkcMKyRecR9in/89SPiPmsX2mjdCo9kI9ZVBxL1KLv6Bb6AtzT
AJQEYK7cZsurSLLYMckVyTuzC29N1d+e8rujwdW72+rnryNM6me9/V/M4Qt9E4W0
QSiEeuUi0VASyyIF+nOngFglBOscfER2CfBExufkiqkpUSbzgjXGZDzuhsDTMXfE
avd0H8Ph9PTKqyL0CMqvvA+wSFNlUPkNM/09V4p8ydSm1CnL2oaaIKn7Fp6elgEX
Ghc/8rwOfDN3lLPoM0g6mYCuNhDx/jEpmj2bkhKZJf+wo+uclll3rDIvw39qLbv9
PEwJbYbrmWSCTo6xJIDKQhLSLqpWuA==
=Yo/a
-----END PGP SIGNATURE-----

P
P
pelzflorian (Florian Pelz) wrote on 8 Dec 2018 23:59
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 33678@debbugs.gnu.org)
20181208225906.bqlagnuzxnrgqqlq@pelzflorian.localdomain
On Sat, Dec 08, 2018 at 10:35:51PM +0100, Danny Milosavljevic wrote:
Toggle quote (21 lines)
> Can we do something against the locale problems that keep showing up
> when updating?
>
> Right now, after a half-finished update from guix master (half-finished because
> once any package build breaks, the entire update will stop), I cannot use any
> Umlauts because "xterm -u8" stops working as it should:
> $ xterm -u8
> Warning: locale not supported by C library, locale unchanged
> $
>
> Why does this keep happening? Shouldn't the functional nature and modularity
> of Guix keep using the old locales where those make sense and the new locales
> where those make sense?
>
> Environment:
>
> $ 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

Is this only on foreign distros? I cannot reproduce this in a Guix VM.

These errors occurred for me on the foreign distro Debian also for
Debian commands like localectl because the locale command was taken
from a glibc in root’s guix profile. I uninstalled the glibc package
and now Debian’s locale commands work again. `strace locale` made it
seem like the directory for the de_DE.UTF-8 locale was never checked
by the locale program, only de_DE.utf8 and others, which apparently
are not what Debian uses.

Regards,
Florian
L
L
Ludovic Courtès wrote on 9 Dec 2018 00:35
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 33678@debbugs.gnu.org)
87sgz74mn9.fsf@gnu.org
Guten Tag! :-)

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (14 lines)
> Can we do something against the locale problems that keep showing up
> when updating?
>
> Right now, after a half-finished update from guix master (half-finished because
> once any package build breaks, the entire update will stop), I cannot use any
> Umlauts because "xterm -u8" stops working as it should:
> $ xterm -u8
> Warning: locale not supported by C library, locale unchanged
> $
>
> Why does this keep happening? Shouldn't the functional nature and modularity
> of Guix keep using the old locales where those make sense and the new locales
> where those make sense?

Please see:


The solution, as described in this section, is to have both (say)
locales for glibc 2.27 and locales for glibc 2.28, which you can specify
in ‘locale-libcs’.

Another option is what ‘guix’ commands print every time you run them: to
install the corresponding ‘glibc-utf8-locales’ package.

Now I perfectly understands that this annoys everyone of us when that
happens, and many people don’t seem to find the info. So I’m open to
suggestions on how to improve this!

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 8 Apr 2019 22:23
control message for bug #33678
(address . control@debbugs.gnu.org)
874l78utyo.fsf@gnu.org
tags 33678 fixed
close 33678
?