From mboxrd@z Thu Jan 1 00:00:00 1970 From: zimoun Subject: Re: Locales in a Guix container (somewhat related to r-readr)? Date: Fri, 21 Feb 2020 12:35:18 +0100 Message-ID: References: <20200220153934.uqftcxvs4wv25bbh@wzguix> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37439) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j56aj-0006rM-GM for help-guix@gnu.org; Fri, 21 Feb 2020 06:35:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j56ag-0005g7-Em for help-guix@gnu.org; Fri, 21 Feb 2020 06:35:33 -0500 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]:35663) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j56ag-0005fz-Az for help-guix@gnu.org; Fri, 21 Feb 2020 06:35:30 -0500 Received: by mail-qk1-x742.google.com with SMTP id v2so1497002qkj.2 for ; Fri, 21 Feb 2020 03:35:30 -0800 (PST) In-Reply-To: <20200220153934.uqftcxvs4wv25bbh@wzguix> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: help-guix , wz@freeshell.de Dear, On Thu, 20 Feb 2020 at 16:42, Wiktor =C5=BBelazny wrote: > I don=E2=80=99t know if it=E2=80=99s some recent change in the Guix behav= ior, but I > noticed that I=E2=80=99m getting no utf-8 locales in a container. I disco= vered > 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=3D"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=3D"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=3D"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=3D/gnu/store/$(ls -F /gnu/store | grep gl= ibc-utf8-locales.*/ | tail -n 1)lib/locale > ~ [env]$ LC_ALL=3Den_US.utf8 I am not convinced by the hack of bug#39665 [1]. [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39665#8 > Are locales intentionally set to =E2=80=9CC=E2=80=9D in a container by de= fault (or are > they unset, perhaps)? I guess so, and consequently, I=E2=80=99m not treat= ing > this as a bug. I do not know. All the best, simon