GNU bug report logs - #35671
guix-daemon cannot find UTF-8 locale out-of-the-box on foreign distros

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Ludovic Courtès <ludovic.courtes@HIDDEN>; dated Fri, 10 May 2019 16:33:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 35671 <at> debbugs.gnu.org:


Received: (at 35671) by debbugs.gnu.org; 15 May 2019 01:35:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 21:35:13 2019
Received: from localhost ([127.0.0.1]:50506 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hQip6-0006Bj-KX
	for submit <at> debbugs.gnu.org; Tue, 14 May 2019 21:35:12 -0400
Received: from mx1.riseup.net ([198.252.153.129]:37710)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <meiyo@HIDDEN>) id 1hQip4-0006BX-9H
 for 35671 <at> debbugs.gnu.org; Tue, 14 May 2019 21:35:11 -0400
Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK))
 by mx1.riseup.net (Postfix) with ESMTPS id 44C921A19B1;
 Tue, 14 May 2019 18:35:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1557884109; bh=zTECPJatrkTf6GRi7OEbWnXYp9AOLdg5c/7jYWzHwnI=;
 h=References:From:To:Cc:Subject:In-reply-to:Date:From;
 b=na9F2zYoqjTAXA1CQoMSU/bKkUKsVcubJrpXLjRHGgqIKptFfDQVjbXDj9Ze03h1k
 RO7pofMv7BsFj/aFq9KJ42rGsFCKltucR2c031qc60BwCj5OIpGInx/r+vkraseMr/
 q3NRPWX22hrgA9zeedl7erKto9haz94psAAk8xZM=
X-Riseup-User-ID: DE6021D5B2774ABA81803D5F76C1CA58A2C8E1BCC77B261C1F2435BC880DABE7
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by capuchin.riseup.net (Postfix) with ESMTPSA id 36DE612051C;
 Tue, 14 May 2019 18:35:07 -0700 (PDT)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id b8d55a3b;
 Wed, 15 May 2019 01:35:05 +0000 (UTC)
References: <877eayz2x0.fsf@HIDDEN> <87o946ozj3.fsf@HIDDEN>
 <87a7fp23bo.fsf@HIDDEN> <87y338wy7q.fsf@HIDDEN>
From: Meiyo Peng <meiyo@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
In-reply-to: <87y338wy7q.fsf@HIDDEN>
Date: Wed, 15 May 2019 09:35:05 +0800
Message-ID: <87ftpg5wl2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 35671
Cc: 35671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Ludovic,

Ludovic Court=C3=A8s writes:

> Meiyo Peng <meiyo@HIDDEN> skribis:
>
>> I was surprised last week (maybe the week before that) when I found out
>> that glibc-utf8-locales only provides locales for de_DE, el_GR, en_US,
>> fr_FR, tr_TR.  And in our manual, we tell people to install
>> glibc-utf8-locales after installing Guix on a foreign distro in order to
>> solve locale problems.  The name "glibc-utf8-locales" indicates it
>> provides ALL UTF-8 locales while in fact it does not.  This caused me a
>> trouble because I have to set the locale of Emacs to zh_CN.UTF-8 in
>> order to enable the ibus input method in Emacs.  (This is a known
>> problem of Emacs.  Locale has to be set to one of CJK locale in order to
>> enable external input methods.)  Since the zh_CN.UTF-8 locale is not in
>> $GUIX_LOCPATH, ibus does not work in Emacs.  I ended up installing the
>> "glibc-locales" package and solved the problem.
>
> To be fair, the manual has always recommended =E2=80=98glibc-locales=E2=
=80=99, not
> =E2=80=98glibc-utf8-locales=E2=80=99, and the latter is explicitly descri=
bed as =E2=80=9Climited
> to a few UTF-8 locales=E2=80=9D:
>
>   https://www.gnu.org/software/guix/manual/en/html_node/Application-Setup=
.html

You are right.  My mistake.  But when I saw the text:

#+begin_quote
  Note that the glibc-locales package contains data for all the locales
  supported by the GNU libc and weighs in at around 110 MiB.
  Alternatively, the glibc-utf8-locales is smaller but limited to a
  few UTF-8 locales.
#+end_quote

I thought the glibc-utf8-locales should satisfy my requirements since
all my locales are in UTF-8, and it's preferred if disk space is
limited.  The name of glibc-utf8-locales is misleading.  In fact, the
"few" UTF-8 locales it provides are too few.  We'd better modify the
text a little bit if we are going to reach a broader user base.

> The hint in (guix ui) is less clear, though.
>
>> I think it would be better to simply tell people to install the
>> "glibc-locales" package.  There may be a case where different
>> applications are set to different locales.  For example, my system is
>> set to the en_US.UTF-8 locale but my Emacs is set to the zh_CN.UTF-8
>> locale.  So $LC_* only refers to en_US.UTF-8 if guix tries to detect the
>> locale.  If =E2=80=98guix package --install-locales=E2=80=99 only instal=
l what $LANG or
>> $LC_* refers to, zh_CN.UTF-8 won't be installed for me.
>
> That command could take a parameter, of course.

That makes sense.


--
Meiyo Peng
https://www.pengmeiyu.com/




Information forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.

Message received at 35671 <at> debbugs.gnu.org:


Received: (at 35671) by debbugs.gnu.org; 14 May 2019 20:57:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 16:57:59 2019
Received: from localhost ([127.0.0.1]:50018 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hQeUo-0005G7-LT
	for submit <at> debbugs.gnu.org; Tue, 14 May 2019 16:57:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hQeUn-0005Fo-Ca
 for 35671 <at> debbugs.gnu.org; Tue, 14 May 2019 16:57:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42486)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hQeUi-0004GH-2I; Tue, 14 May 2019 16:57:52 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=37412 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1hQeUd-000272-3q; Tue, 14 May 2019 16:57:47 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Meiyo Peng <meiyo@HIDDEN>
Subject: Re: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
References: <877eayz2x0.fsf@HIDDEN> <87o946ozj3.fsf@HIDDEN>
 <87a7fp23bo.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 25 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 14 May 2019 22:57:45 +0200
In-Reply-To: <87a7fp23bo.fsf@HIDDEN> (Meiyo Peng's message of "Tue, 14 May
 2019 10:10:51 +0800")
Message-ID: <87y338wy7q.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35671
Cc: 35671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Meiyo Peng <meiyo@HIDDEN> skribis:

> I was surprised last week (maybe the week before that) when I found out
> that glibc-utf8-locales only provides locales for de_DE, el_GR, en_US,
> fr_FR, tr_TR.  And in our manual, we tell people to install
> glibc-utf8-locales after installing Guix on a foreign distro in order to
> solve locale problems.  The name "glibc-utf8-locales" indicates it
> provides ALL UTF-8 locales while in fact it does not.  This caused me a
> trouble because I have to set the locale of Emacs to zh_CN.UTF-8 in
> order to enable the ibus input method in Emacs.  (This is a known
> problem of Emacs.  Locale has to be set to one of CJK locale in order to
> enable external input methods.)  Since the zh_CN.UTF-8 locale is not in
> $GUIX_LOCPATH, ibus does not work in Emacs.  I ended up installing the
> "glibc-locales" package and solved the problem.

To be fair, the manual has always recommended =E2=80=98glibc-locales=E2=80=
=99, not
=E2=80=98glibc-utf8-locales=E2=80=99, and the latter is explicitly describe=
d as =E2=80=9Climited
to a few UTF-8 locales=E2=80=9D:

  https://www.gnu.org/software/guix/manual/en/html_node/Application-Setup.h=
tml

The hint in (guix ui) is less clear, though.

> I think it would be better to simply tell people to install the
> "glibc-locales" package.  There may be a case where different
> applications are set to different locales.  For example, my system is
> set to the en_US.UTF-8 locale but my Emacs is set to the zh_CN.UTF-8
> locale.  So $LC_* only refers to en_US.UTF-8 if guix tries to detect the
> locale.  If =E2=80=98guix package --install-locales=E2=80=99 only install=
 what $LANG or
> $LC_* refers to, zh_CN.UTF-8 won't be installed for me.

That command could take a parameter, of course.

See also:
<https://lists.gnu.org/archive/html/guix-devel/2019-05/msg00285.html>.

Thanks for your feedback!

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.

Message received at 35671 <at> debbugs.gnu.org:


Received: (at 35671) by debbugs.gnu.org; 14 May 2019 06:25:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 14 02:25:07 2019
Received: from localhost ([127.0.0.1]:46967 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hQQs6-00061r-LY
	for submit <at> debbugs.gnu.org; Tue, 14 May 2019 02:25:07 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43591)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hQQs4-00061K-DE
 for 35671 <at> debbugs.gnu.org; Tue, 14 May 2019 02:25:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52123)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hQIpn-0001vO-3T
 for 35671 <at> debbugs.gnu.org; Mon, 13 May 2019 17:50:17 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=34196 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1hQIpj-0005Ec-Fp
 for 35671 <at> debbugs.gnu.org; Mon, 13 May 2019 17:50:10 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 35671 <at> debbugs.gnu.org
Subject: Re: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
References: <877eayz2x0.fsf@HIDDEN> <87o946ozj3.fsf@HIDDEN>
Date: Mon, 13 May 2019 23:50:05 +0200
In-Reply-To: <87o946ozj3.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Mon, 13 May 2019 22:44:16 +0200")
Message-ID: <87a7fqowhe.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35671
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi!

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludovic.courtes@HIDDEN> skribis:
>
>> I noticed that on Debian 9, =E2=80=98guix-daemon.service=E2=80=99 (syste=
md) runs under
>> the C.UTF-8 locale by default, even if the machine is otherwise
>> configured with another locale.  Consequently, =E2=80=98guix substitute=
=E2=80=99 keeps
>> complaining about locales and all that, which is terrible.
>
> It turns out that the =E2=80=9CC.UTF-8=E2=80=9D locale doesn=E2=80=99t ex=
ist upstream in glibc:
>
>   https://bugzilla.redhat.com/show_bug.cgi?id=3D902094
>
> But anyway, I think we should just set =E2=80=9CLC_ALL=3Den_US.utf8=E2=80=
=9D in the
> .service file: that=E2=80=99s what we do on Guix System, and the choice o=
f a
> locale doesn=E2=80=99t matter since =E2=80=98guix substitute=E2=80=99 hon=
ors the client=E2=80=99s
> locale.

Done in 489d6c0dc03f1d95a3fefa6301f36cac9b50b2c3.

I got the syntax from
<https://www.freedesktop.org/software/systemd/man/systemd.service.html>
but I wouldn=E2=80=99t mind if someone would double-check!

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.

Message received at 35671 <at> debbugs.gnu.org:


Received: (at 35671) by debbugs.gnu.org; 14 May 2019 02:11:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 22:11:10 2019
Received: from localhost ([127.0.0.1]:46789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hQMuL-00063S-Qe
	for submit <at> debbugs.gnu.org; Mon, 13 May 2019 22:11:10 -0400
Received: from mx1.riseup.net ([198.252.153.129]:51220)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <meiyo@HIDDEN>) id 1hQMuG-00063G-If
 for 35671 <at> debbugs.gnu.org; Mon, 13 May 2019 22:11:06 -0400
Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK))
 by mx1.riseup.net (Postfix) with ESMTPS id 976C01A3177;
 Mon, 13 May 2019 19:11:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1557799863; bh=ODmzrivpu5aYBrfPiPwCzKNFRVgVYqzyJwfJ5yBqojg=;
 h=References:From:To:Cc:Subject:In-reply-to:Date:From;
 b=DGvBOguq1E85BkIZIQkaRoZsdbEsYpotAbIVBQaeeSQELWtLpqzmivDmRZolMMWdL
 AQZdyviCAGzKnGjSG13DItYWxz9sqPGk7ua3VxHaA2BrLzOUXwpTvufgvagdjAc4L2
 9FTXofe0P4qQI0KmvxgjbR7A9v2mJI/OlXbqoNE4=
X-Riseup-User-ID: A3D2FA47EE9AE0C88548DBD7CD0DBA93F2AEC2B5F57153D410B9627CA821D9BD
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by bell.riseup.net (Postfix) with ESMTPSA id 107532232DD;
 Mon, 13 May 2019 19:11:01 -0700 (PDT)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id e32d23bb;
 Tue, 14 May 2019 02:10:51 +0000 (UTC)
References: <877eayz2x0.fsf@HIDDEN> <87o946ozj3.fsf@HIDDEN>
From: Meiyo Peng <meiyo@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
In-reply-to: <87o946ozj3.fsf@HIDDEN>
Date: Tue, 14 May 2019 10:10:51 +0800
Message-ID: <87a7fp23bo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 35671
Cc: 35671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Ludovic,

Ludovic Court=C3=A8s writes:

> But anyway, I think we should just set =E2=80=9CLC_ALL=3Den_US.utf8=E2=80=
=9D in the
> .service file: that=E2=80=99s what we do on Guix System, and the choice o=
f a
> locale doesn=E2=80=99t matter since =E2=80=98guix substitute=E2=80=99 hon=
ors the client=E2=80=99s
> locale.

That's what I did to my guix-daemon.service and guix-publish.service
files on a foreign distro after getting locale warnings.

> Meiyo Peng <meiyo@HIDDEN> skribis:
>
>> Ludovic Court=C3=A8s writes:
>
> [...]
>
>>> Thus, I think =E2=80=98glibc-utf8-locales=E2=80=99 should provide that =
locale.
>>
>> And the zh_CN.UTF-8, zh_TW.UTF-8 please.
>
> =E2=80=98glibc-utf8-locales=E2=80=99 has always been described as an *arb=
itrary* sample
> of UTF-8 locales (info "(guix) Application Setup").  Initially its main
> purpose was to use it in build processes, but we=E2=80=99ve come to more =
or less
> recommend it for users, which is not great because we know it only works
> for some users.

I was surprised last week (maybe the week before that) when I found out
that glibc-utf8-locales only provides locales for de_DE, el_GR, en_US,
fr_FR, tr_TR.  And in our manual, we tell people to install
glibc-utf8-locales after installing Guix on a foreign distro in order to
solve locale problems.  The name "glibc-utf8-locales" indicates it
provides ALL UTF-8 locales while in fact it does not.  This caused me a
trouble because I have to set the locale of Emacs to zh_CN.UTF-8 in
order to enable the ibus input method in Emacs.  (This is a known
problem of Emacs.  Locale has to be set to one of CJK locale in order to
enable external input methods.)  Since the zh_CN.UTF-8 locale is not in
$GUIX_LOCPATH, ibus does not work in Emacs.  I ended up installing the
"glibc-locales" package and solved the problem.

> I built a =E2=80=98glibc-utf8-locales=E2=80=99 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-locale=
s-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=E2=80=99s almost the same size as =E2=80=98glibc-local=
es=E2=80=99, so there=E2=80=99s
> no point in having such a =E2=80=98glibc-utf8-locales=E2=80=99 package.
>
> In Guix System, the (gnu system locale) module generates just the needed
> locales.  I=E2=80=99m thinking we should do the same at the =E2=80=98guix=
 package=E2=80=99
> level.  For example, =E2=80=98guix package --install-locales=E2=80=99 wou=
ld
> automatically install whatever $LANG or $LC_* refers to.
>
> Thoughts?

I think it would be better to simply tell people to install the
"glibc-locales" package.  There may be a case where different
applications are set to different locales.  For example, my system is
set to the en_US.UTF-8 locale but my Emacs is set to the zh_CN.UTF-8
locale.  So $LC_* only refers to en_US.UTF-8 if guix tries to detect the
locale.  If =E2=80=98guix package --install-locales=E2=80=99 only install w=
hat $LANG or
$LC_* refers to, zh_CN.UTF-8 won't be installed for me.

We are unable to detect what locales a user will need later.  Installing
a full package like "glibc-locales" or letting the user explicitly
specify what locales they need can avoid a lot of special problems.


--
Meiyo Peng
https://www.pengmeiyu.com/




Information forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.
Changed bug title to 'guix-daemon cannot find UTF-8 locale out-of-the-box on foreign distros' from ''glibc-utf8-locales' should include C.UTF-8 locale' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 35671 <at> debbugs.gnu.org:


Received: (at 35671) by debbugs.gnu.org; 13 May 2019 20:44:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 13 16:44:27 2019
Received: from localhost ([127.0.0.1]:46458 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hQHoB-0006sX-2F
	for submit <at> debbugs.gnu.org; Mon, 13 May 2019 16:44:27 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58743)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1hQHo8-0006sK-A8
 for 35671 <at> debbugs.gnu.org; Mon, 13 May 2019 16:44:25 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51213)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1hQHo3-0007VR-2e
 for 35671 <at> debbugs.gnu.org; Mon, 13 May 2019 16:44:19 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33660 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1hQHo2-0001P7-De
 for 35671 <at> debbugs.gnu.org; Mon, 13 May 2019 16:44:18 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 35671 <at> debbugs.gnu.org
Subject: Re: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
References: <877eayz2x0.fsf@HIDDEN>
Date: Mon, 13 May 2019 22:44:16 +0200
In-Reply-To: <877eayz2x0.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22\?\=
 \=\?utf-8\?Q\?'s\?\= message of "Fri, 10 May 2019 18:31:55 +0200")
Message-ID: <87o946ozj3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35671
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Ludovic Court=C3=A8s <ludovic.courtes@HIDDEN> skribis:

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

It turns out that the =E2=80=9CC.UTF-8=E2=80=9D locale doesn=E2=80=99t exis=
t upstream in glibc:

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

But anyway, I think we should just set =E2=80=9CLC_ALL=3Den_US.utf8=E2=80=
=9D in the
.service file: that=E2=80=99s what we do on Guix System, and the choice of a
locale doesn=E2=80=99t matter since =E2=80=98guix substitute=E2=80=99 honor=
s the client=E2=80=99s
locale.

Meiyo Peng <meiyo@HIDDEN> skribis:

> Ludovic Court=C3=A8s writes:

[...]

>> Thus, I think =E2=80=98glibc-utf8-locales=E2=80=99 should provide that l=
ocale.
>
> And the zh_CN.UTF-8, zh_TW.UTF-8 please.

=E2=80=98glibc-utf8-locales=E2=80=99 has always been described as an *arbit=
rary* sample
of UTF-8 locales (info "(guix) Application Setup").  Initially its main
purpose was to use it in build processes, but we=E2=80=99ve 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 =E2=80=98glibc-utf8-locales=E2=80=99 package that provides all th=
e 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    s=
elf
/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.2=
8/lib/locale/2.28/*.utf8 |wc -l
312
$ guix size glibc-locales
store item                                                       total    s=
elf
/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=E2=80=99s almost the same size as =E2=80=98glibc-locales=
=E2=80=99, so there=E2=80=99s
no point in having such a =E2=80=98glibc-utf8-locales=E2=80=99 package.

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

Thoughts?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.

Message received at 35671 <at> debbugs.gnu.org:


Received: (at 35671) by debbugs.gnu.org; 11 May 2019 03:49:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 10 23:49:00 2019
Received: from localhost ([127.0.0.1]:39594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hPJ0N-0006a6-Oy
	for submit <at> debbugs.gnu.org; Fri, 10 May 2019 23:49:00 -0400
Received: from mx1.riseup.net ([198.252.153.129]:49238)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <meiyo@HIDDEN>) id 1hPJ0K-0006Zx-Ue
 for 35671 <at> debbugs.gnu.org; Fri, 10 May 2019 23:48:57 -0400
Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (Client CN "*.riseup.net",
 Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK))
 by mx1.riseup.net (Postfix) with ESMTPS id D108B1A30B7;
 Fri, 10 May 2019 20:48:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak;
 t=1557546535; bh=zlnuOqeMjoMU4ZaGoFRdpM1cQdVGfcDAdHr+QHfKu4c=;
 h=References:From:To:Cc:Subject:In-reply-to:Date:From;
 b=TwX43XSxktnsOZuFTg9ab68YaKg6tB+p5r/FnavAX+Uy92PVO/yzOa9+rAlwX7DB7
 f3bN86ywfyUJvx0DaIAut9qhh1+CJ4PdtPA2jzVUTdvjuCOBMd25aQU53v78uqfVIF
 6An27fmkRyixerNbfVhvqQBIa3RW0v0XScxccyhk=
X-Riseup-User-ID: CB95324D9000093A611C9E3F9B9EB4DBB8ED5FDC0C9D36A22172944081E4E12D
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by bell.riseup.net (Postfix) with ESMTPSA id B957922296B;
 Fri, 10 May 2019 20:48:54 -0700 (PDT)
Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id ba917fc9;
 Sat, 11 May 2019 03:48:53 +0000 (UTC)
References: <877eayz2x0.fsf@HIDDEN>
From: Meiyo Peng <meiyo@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
Subject: Re: bug#35671: 'glibc-utf8-locales' should include C.UTF-8 locale
In-reply-to: <877eayz2x0.fsf@HIDDEN>
Date: Sat, 11 May 2019 11:48:53 +0800
Message-ID: <871s15vefu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 35671
Cc: 35671 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi Ludovic,

Ludovic Court=C3=A8s writes:

> I noticed that on Debian 9, =E2=80=98guix-daemon.service=E2=80=99 (system=
d) runs under
> the C.UTF-8 locale by default, even if the machine is otherwise
> configured with another locale.  Consequently, =E2=80=98guix substitute=
=E2=80=99 keeps
> complaining about locales and all that, which is terrible.
>
> Thus, I think =E2=80=98glibc-utf8-locales=E2=80=99 should provide that lo=
cale.

And the zh_CN.UTF-8, zh_TW.UTF-8 please.


--
Meiyo Peng
https://www.pengmeiyu.com/




Information forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 May 2019 16:32:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 10 12:32:14 2019
Received: from localhost ([127.0.0.1]:38895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hP8RS-0004fm-MZ
	for submit <at> debbugs.gnu.org; Fri, 10 May 2019 12:32:14 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1hP8RO-0004fW-JX
 for submit <at> debbugs.gnu.org; Fri, 10 May 2019 12:32:13 -0400
Received: from lists.gnu.org ([209.51.188.17]:52912)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1hP8RI-0005Bm-Sz
 for submit <at> debbugs.gnu.org; Fri, 10 May 2019 12:32:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44053)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1hP8RH-0003HA-Ul
 for bug-guix@HIDDEN; Fri, 10 May 2019 12:32:04 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_HI
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1hP8RG-0005Ay-RD
 for bug-guix@HIDDEN; Fri, 10 May 2019 12:32:03 -0400
Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:50733)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1hP8RG-00059H-I9
 for bug-guix@HIDDEN; Fri, 10 May 2019 12:32:02 -0400
X-IronPort-AV: E=Sophos;i="5.60,454,1549926000"; d="scan'208";a="305601348"
Received: from unknown (HELO ribbon) ([193.50.110.224])
 by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES256-GCM-SHA384;
 10 May 2019 18:31:56 +0200
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludovic.courtes@HIDDEN>
To: Bug Guix <bug-guix@HIDDEN>
Subject: 'glibc-utf8-locales' should include C.UTF-8 locale
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 21 =?utf-8?Q?Flor=C3=A9al?= an 227 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Fri, 10 May 2019 18:31:55 +0200
Message-ID: <877eayz2x0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 192.134.164.104
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,

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

Thus, I think =E2=80=98glibc-utf8-locales=E2=80=99 should provide that loca=
le.

Ludo=E2=80=99.




Acknowledgement sent to Ludovic Courtès <ludovic.courtes@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#35671; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.