all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 35671@debbugs.gnu.org
Subject: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
Date: Mon, 13 May 2019 22:44:16 +0200	[thread overview]
Message-ID: <87o946ozj3.fsf@gnu.org> (raw)
In-Reply-To: <877eayz2x0.fsf@inria.fr> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Fri, 10 May 2019 18:31:55 +0200")

Hello,

Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

> I noticed that on Debian 9, ‘guix-daemon.service’ (systemd) runs under
> the C.UTF-8 locale by default, even if the machine is otherwise
> configured with another locale.  Consequently, ‘guix substitute’ keeps
> complaining about locales and all that, which is terrible.

It turns out that the “C.UTF-8” locale doesn’t exist upstream in glibc:

  https://bugzilla.redhat.com/show_bug.cgi?id=902094

But anyway, I think we should just set “LC_ALL=en_US.utf8” in the
.service file: that’s what we do on Guix System, and the choice of a
locale doesn’t matter since ‘guix substitute’ honors the client’s
locale.

Meiyo Peng <meiyo@riseup.net> skribis:

> Ludovic Courtès writes:

[...]

>> Thus, I think ‘glibc-utf8-locales’ should provide that locale.
>
> And the zh_CN.UTF-8, zh_TW.UTF-8 please.

‘glibc-utf8-locales’ has always been described as an *arbitrary* sample
of UTF-8 locales (info "(guix) Application Setup").  Initially its main
purpose was to use it in build processes, but we’ve come to more or less
recommend it for users, which is not great because we know it only works
for some users.

I built a ‘glibc-utf8-locales’ package that provides all the supported
UTF-8 locales, and only UTF-8 locales:

--8<---------------cut here---------------start------------->8---
$ guix size /gnu/store/rh7iq1kwma7ir96mvzvqcg1v50yi05yp-glibc-utf8-locales-2.28
store item                                                       total    self
/gnu/store/rh7iq1kwma7ir96mvzvqcg1v50yi05yp-glibc-utf8-locales-2.28   855.7   855.7 100.0%
total: 855.7 MiB
$ ls -1d /gnu/store/rh7iq1kwma7ir96mvzvqcg1v50yi05yp-glibc-utf8-locales-2.28/lib/locale/2.28/*.utf8 |wc -l
312
$ guix size glibc-locales
store item                                                       total    self
/gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28     916.7   916.7 100.0%
total: 916.7 MiB
--8<---------------cut here---------------end--------------->8---

As you can see, it’s almost the same size as ‘glibc-locales’, so there’s
no point in having such a ‘glibc-utf8-locales’ package.

In Guix System, the (gnu system locale) module generates just the needed
locales.  I’m thinking we should do the same at the ‘guix package’
level.  For example, ‘guix package --install-locales’ would
automatically install whatever $LANG or $LC_* refers to.

Thoughts?

Thanks,
Ludo’.

  parent reply	other threads:[~2019-05-13 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 16:31 bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale Ludovic Courtès
2019-05-11  3:48 ` Meiyo Peng
2019-05-13 20:44 ` Ludovic Courtès [this message]
2019-05-13 21:50   ` Ludovic Courtès
2021-12-14 17:55     ` bug#35671: guix-daemon cannot find UTF-8 locale out-of-the-box on foreign distros Maxim Cournoyer
2019-05-14  2:10   ` bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale Meiyo Peng
2019-05-14 20:57     ` Ludovic Courtès
2019-05-15  1:35       ` Meiyo Peng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o946ozj3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=35671@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.