unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Guix locales on native distro's
@ 2017-08-26 11:38 Pjotr Prins
  2017-08-27  6:13 ` Pjotr Prins
  2017-08-28 23:03 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Pjotr Prins @ 2017-08-26 11:38 UTC (permalink / raw)
  To: guix-devel

This used to work:

  https://github.com/pjotrp/guix-notes/blob/master/INSTALL.org#set-locale

But lately my locales have been giving me grief and I
want to crack it once and for all. I am running Guix tools on a
non-Guix distro.

First, as per instructions of 

  https://www.gnu.org/software/guix/manual/html_node/Application-Setup.html#locales_002dand_002dlocpath, 

I have installed glibc-utf8-locales which set them for glibc-2.25 and set

  export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale

  ls $GUIX_LOCPATH/2.25/

     en_US.UTF-8
     (etc)

When I run  

   ~/.guix-profile/bin/locale -a
     C
     POSIX

Which looks limited, but is probably correct.

I am running locale, bash, xterm etc. as Guix tools all linked to
glibc-2.25. I am *not* getting the infamous locale errors. After
setting

  export LC_ALL=en_US.UTF-8
 
and

  locale
    LANG=en_US.UTF-8
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=en_US.UTF-8

All should be well. But when I read or write an E-mail using mutt or
vim (both linked correctly) I don't get to see UTF8. I don't get
non-ASCII output (Ludo's surname, for example).

Oh yes, I am running uxterm and bash from Guix with the correct glibc. All
tools are GUIX based except for X itself. E.g.

  ldd `which xterm`
    libc.so.6 => /gnu/store/ybpgv1v7606xw7mafda66w10hiynpiw2-glibc-2.25/lib/libc.so.6 (0x00007fad9302f000)
    (etc)

Relevant environment settings:

  GUIX_LOCPATH=/home/wrk/.guix-profile/lib/locale
  PATH=/home/wrk/izip/git/opensource/scripts:/home/wrk/.guix-profile/bin:/home/wrk/.guix-profile/sbin:/usr/bin:/bin
  SHELL=/home/wrk/.guix-profile/bin/bash
  TERM=xterm
  TERMINAL=guixterm
  XTERM=xterm
  XTERM_LOCALE=en_US.UTF-8
  XTERM_SHELL=/bin/bash
  XTERM_VERSION='XTerm(322)'

where /bin/bash actually points to a Guix bash.

What is it I am missing? 

Pj.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-26 11:38 Guix locales on native distro's Pjotr Prins
@ 2017-08-27  6:13 ` Pjotr Prins
  2017-08-27  8:56   ` Efraim Flashner
  2017-08-28 23:03 ` Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Pjotr Prins @ 2017-08-27  6:13 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

I have a laptop which is not showing this problem. The difference is
that the tools are linked against glibc 2.22 and 2.23. But, more
likely, it could be X. On the laptop I am using Guix's X.

Does this make sense? 

I'll have to check what video is supported on the Debian X computer.
I'll try a swap. 

Pj.

On Sat, Aug 26, 2017 at 11:38:09AM +0000, Pjotr Prins wrote:
> This used to work:
> 
>   https://github.com/pjotrp/guix-notes/blob/master/INSTALL.org#set-locale
> 
> But lately my locales have been giving me grief and I
> want to crack it once and for all. I am running Guix tools on a
> non-Guix distro.
> 
> First, as per instructions of 
> 
>   https://www.gnu.org/software/guix/manual/html_node/Application-Setup.html#locales_002dand_002dlocpath, 
> 
> I have installed glibc-utf8-locales which set them for glibc-2.25 and set
> 
>   export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
> 
>   ls $GUIX_LOCPATH/2.25/
> 
>      en_US.UTF-8
>      (etc)
> 
> When I run  
> 
>    ~/.guix-profile/bin/locale -a
>      C
>      POSIX
> 
> Which looks limited, but is probably correct.
> 
> I am running locale, bash, xterm etc. as Guix tools all linked to
> glibc-2.25. I am *not* getting the infamous locale errors. After
> setting
> 
>   export LC_ALL=en_US.UTF-8
>  
> and
> 
>   locale
>     LANG=en_US.UTF-8
>     LC_CTYPE="en_US.UTF-8"
>     LC_NUMERIC="en_US.UTF-8"
>     LC_TIME="en_US.UTF-8"
>     LC_COLLATE="en_US.UTF-8"
>     LC_MONETARY="en_US.UTF-8"
>     LC_MESSAGES="en_US.UTF-8"
>     LC_PAPER="en_US.UTF-8"
>     LC_NAME="en_US.UTF-8"
>     LC_ADDRESS="en_US.UTF-8"
>     LC_TELEPHONE="en_US.UTF-8"
>     LC_MEASUREMENT="en_US.UTF-8"
>     LC_IDENTIFICATION="en_US.UTF-8"
>     LC_ALL=en_US.UTF-8
> 
> All should be well. But when I read or write an E-mail using mutt or
> vim (both linked correctly) I don't get to see UTF8. I don't get
> non-ASCII output (Ludo's surname, for example).
> 
> Oh yes, I am running uxterm and bash from Guix with the correct glibc. All
> tools are GUIX based except for X itself. E.g.
> 
>   ldd `which xterm`
>     libc.so.6 => /gnu/store/ybpgv1v7606xw7mafda66w10hiynpiw2-glibc-2.25/lib/libc.so.6 (0x00007fad9302f000)
>     (etc)
> 
> Relevant environment settings:
> 
>   GUIX_LOCPATH=/home/wrk/.guix-profile/lib/locale
>   PATH=/home/wrk/izip/git/opensource/scripts:/home/wrk/.guix-profile/bin:/home/wrk/.guix-profile/sbin:/usr/bin:/bin
>   SHELL=/home/wrk/.guix-profile/bin/bash
>   TERM=xterm
>   TERMINAL=guixterm
>   XTERM=xterm
>   XTERM_LOCALE=en_US.UTF-8
>   XTERM_SHELL=/bin/bash
>   XTERM_VERSION='XTerm(322)'
> 
> where /bin/bash actually points to a Guix bash.
> 
> What is it I am missing? 
> 
> Pj.
> 

-- 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-27  6:13 ` Pjotr Prins
@ 2017-08-27  8:56   ` Efraim Flashner
  2017-08-27 11:57     ` Pjotr Prins
  0 siblings, 1 reply; 9+ messages in thread
From: Efraim Flashner @ 2017-08-27  8:56 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 796 bytes --]

On Sun, Aug 27, 2017 at 08:13:18AM +0200, Pjotr Prins wrote:
> I have a laptop which is not showing this problem. The difference is
> that the tools are linked against glibc 2.22 and 2.23. But, more
> likely, it could be X. On the laptop I am using Guix's X.
> 
> Does this make sense? 
> 
> I'll have to check what video is supported on the Debian X computer.
> I'll try a swap. 
> 
> Pj.
> 

glibc 2.22 and 2.23 from guix or from the host/foreign distro? guix has
been at 2.25 for a while now, could you test if you still have the
issues with it more up to date?


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-27  8:56   ` Efraim Flashner
@ 2017-08-27 11:57     ` Pjotr Prins
  2017-08-27 13:35       ` Ricardo Wurmus
  0 siblings, 1 reply; 9+ messages in thread
From: Pjotr Prins @ 2017-08-27 11:57 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

On Sun, Aug 27, 2017 at 11:56:37AM +0300, Efraim Flashner wrote:
> glibc 2.22 and 2.23 from guix or from the host/foreign distro? 

Guix glibc.

> guix has been at 2.25 for a while now, could you test if you still
> have the issues with it more up to date?

2.25 is giving the problems. Not the older versions (older laptop).

I'll play around with versions. Could it be X? It makes no intuitive
sense to me. X only does pixel-based rendering, right? I would think that bash
matters when it comes to terminal support. Or is it uxterm/xterm only
that handles locale rendering? 

Pj.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-27 11:57     ` Pjotr Prins
@ 2017-08-27 13:35       ` Ricardo Wurmus
  2017-08-27 15:47         ` Pjotr Prins
  0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Wurmus @ 2017-08-27 13:35 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel


Pjotr Prins <pjotr.public12@thebird.nl> writes:

> On Sun, Aug 27, 2017 at 11:56:37AM +0300, Efraim Flashner wrote:
>> glibc 2.22 and 2.23 from guix or from the host/foreign distro?
>
> Guix glibc.
>
>> guix has been at 2.25 for a while now, could you test if you still
>> have the issues with it more up to date?
>
> 2.25 is giving the problems. Not the older versions (older laptop).

You wrote earlier:

> The difference is
> that the tools are linked against glibc 2.22 and 2.23

This means that you will need to have glibc-locales for all three
versions.  GUIX_LOCPATH is set to “lib/locales”, which contains
versioned sub-directories.  If the directory only contains locales for
2.25, then your applications that are linked with 2.22 or 2.23 can’t
possibly be able to find the proper locale data.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-27 13:35       ` Ricardo Wurmus
@ 2017-08-27 15:47         ` Pjotr Prins
  2017-09-24  8:36           ` Pjotr Prins
  0 siblings, 1 reply; 9+ messages in thread
From: Pjotr Prins @ 2017-08-27 15:47 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

On Sun, Aug 27, 2017 at 03:35:17PM +0200, Ricardo Wurmus wrote:
 
> > The difference is
> > that the tools are linked against glibc 2.22 and 2.23
> 
> This means that you will need to have glibc-locales for all three
> versions.  GUIX_LOCPATH is set to “lib/locales”, which contains
> versioned sub-directories.  If the directory only contains locales for
> 2.25, then your applications that are linked with 2.22 or 2.23 can’t
> possibly be able to find the proper locale data.

All locales are there. I checked.

Pj.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-26 11:38 Guix locales on native distro's Pjotr Prins
  2017-08-27  6:13 ` Pjotr Prins
@ 2017-08-28 23:03 ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2017-08-28 23:03 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

Hi Pjotr,

Pjotr Prins <pjotr.public12@thebird.nl> skribis:

> All should be well. But when I read or write an E-mail using mutt or
> vim (both linked correctly) I don't get to see UTF8. I don't get
> non-ASCII output (Ludo's surname, for example).

Can your xterm display UTF-8-encoded text at all?  Like what does it
display if you run “cat README”?

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-08-27 15:47         ` Pjotr Prins
@ 2017-09-24  8:36           ` Pjotr Prins
  2017-10-03  6:25             ` Pjotr Prins
  0 siblings, 1 reply; 9+ messages in thread
From: Pjotr Prins @ 2017-09-24  8:36 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Sun, Aug 27, 2017 at 05:47:29PM +0200, Pjotr Prins wrote:
> On Sun, Aug 27, 2017 at 03:35:17PM +0200, Ricardo Wurmus wrote:
>  
> > > The difference is
> > > that the tools are linked against glibc 2.22 and 2.23
> > 
> > This means that you will need to have glibc-locales for all three
> > versions.  GUIX_LOCPATH is set to “lib/locales”, which contains
> > versioned sub-directories.  If the directory only contains locales for
> > 2.25, then your applications that are linked with 2.22 or 2.23 can’t
> > possibly be able to find the proper locale data.
> 
> All locales are there. I checked.

OK, I managed to find a way out, i.e, a reproducable working version.

Essentially, after installing xterm and locales I need to load

    source ~/.guix-profile/etc/profile

followed by firing up a uxterm which I have as an alias

    alias guixterm='/home/wrk/.guix-profile/bin/uxterm -vb -fg black -bg lightyellow -fn *-fixed-*-*-*-*-20-*'

    guixterm &

That gives me the full locale support with, for example, 

    export LC_ALL=en_GB.UTF-8

I realize now that the problem I had before was variations on the
startup procedure. As I don't always have the standard GUIX profile by
default (I have different profiles for different needs) I need to
start that up first. Then run a uxterm with that background and
locales work fine on Debian too.

Pj.
-- 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Guix locales on native distro's
  2017-09-24  8:36           ` Pjotr Prins
@ 2017-10-03  6:25             ` Pjotr Prins
  0 siblings, 0 replies; 9+ messages in thread
From: Pjotr Prins @ 2017-10-03  6:25 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: guix-devel

On Sun, Sep 24, 2017 at 10:36:46AM +0200, Pjotr Prins wrote:
> followed by firing up a uxterm which I have as an alias
> 
>     alias guixterm='/home/wrk/.guix-profile/bin/uxterm -vb -fg black -bg lightyellow -fn *-fixed-*-*-*-*-20-*'
> 
>     guixterm &
> 
> That gives me the full locale support with, for example, 
> 
>     export LC_ALL=en_GB.UTF-8
> 
> I realize now that the problem I had before was variations on the
> startup procedure. As I don't always have the standard GUIX profile by
> default (I have different profiles for different needs) I need to
> start that up first. Then run a uxterm with that background and
> locales work fine on Debian too.

uxterm is actually a shell script, better to alias as

  alias guixterm=$HOME/.guix-profile/bin/xterm -class UXTerm -title uxterm -u8 -vb -fg black -bg lightyellow -fn *-fixed-*-*-*-*-20-*

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-10-03  6:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 11:38 Guix locales on native distro's Pjotr Prins
2017-08-27  6:13 ` Pjotr Prins
2017-08-27  8:56   ` Efraim Flashner
2017-08-27 11:57     ` Pjotr Prins
2017-08-27 13:35       ` Ricardo Wurmus
2017-08-27 15:47         ` Pjotr Prins
2017-09-24  8:36           ` Pjotr Prins
2017-10-03  6:25             ` Pjotr Prins
2017-08-28 23:03 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

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).