From: zimoun <zimon.toutoune@gmail.com>
To: help-guix <help-guix@gnu.org>, wz@freeshell.de
Subject: Re: Locales in a Guix container (somewhat related to r-readr)?
Date: Fri, 21 Feb 2020 12:35:18 +0100 [thread overview]
Message-ID: <CAJ3okZ0P76u1KSnDM5DCbsLdFPR7r-_xpMSDsu-Fz4k407Sgcg@mail.gmail.com> (raw)
In-Reply-To: <20200220153934.uqftcxvs4wv25bbh@wzguix>
Dear,
On Thu, 20 Feb 2020 at 16:42, Wiktor Żelazny <wz@freeshell.de> wrote:
> I don’t know if it’s some recent change in the Guix behavior, but I
> noticed that I’m getting no utf-8 locales in a container. I discovered
> it while reading a utf-8 csv file using readr::read_csv().
Could you provide a minimalist example?
> Outside of a container, I can do this:
>
> ~$ echo $LC_ALL
>
> ~$ LC_ALL="en_US.utf8"
> ~$ echo $LC_ALL
> en_US.utf8
On my Debian machine, outside the container I get:
--8<---------------cut here---------------start------------->8---
$ LC_ALL="en_US.utf8"
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
--8<---------------cut here---------------end--------------->8---
> But inside:
>
> ~$ guix environment -C --pure
> ~ [env]$ echo $LC_ALL
>
> ~ [env]$ LC_ALL="en_US.utf8"
> sh: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8): No such file or directory
> ~ [env]$ exit
> exit
I get that outside the container. It means that you did something
outside you are not doing inside.
> Similarly as in the bug #39665, a solution, inspired by [1], comes with
> a hack:
>
> ~ [env]$ export GUIX_LOCPATH=/gnu/store/$(ls -F /gnu/store | grep glibc-utf8-locales.*/ | tail -n 1)lib/locale
> ~ [env]$ LC_ALL=en_US.utf8
I am not convinced by the hack of bug#39665 [1].
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39665#8
> Are locales intentionally set to “C” in a container by default (or are
> they unset, perhaps)? I guess so, and consequently, I’m not treating
> this as a bug.
I do not know.
All the best,
simon
next prev parent reply other threads:[~2020-02-21 11:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 15:39 Locales in a Guix container (somewhat related to r-readr)? Wiktor Żelazny
2020-02-21 11:35 ` zimoun [this message]
2020-02-24 14:27 ` Wiktor Żelazny
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ3okZ0P76u1KSnDM5DCbsLdFPR7r-_xpMSDsu-Fz4k407Sgcg@mail.gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=help-guix@gnu.org \
--cc=wz@freeshell.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).