[Nix-dev] awesome locale issues

Lluís Batlle i Rossell viriketo at gmail.com
Mon Aug 23 21:15:34 CEST 2010


nixpkgs' glibc will look at LOCALE_ARCHIVE env var for its locale-archive.
You can install a locale archive instantiating "glibc-locales" by nix. Then set
that environment variable pointing to it.

locale-archives are incompatible between glibc versions, and ubuntu in fact is
providing none of them, iirc.

Regards,
Lluís.
On Mon, Aug 23, 2010 at 09:02:42PM +0200, Florian Friesdorf wrote:
> On Mon, Aug 23, 2010 at 06:54:08PM +0200, Florian Friesdorf wrote:
> > One step, further: awesome is running with popen (thx peter!) and the
> > battery and clock obvious widgets are working.
> > 
> > However, instead of displaying the volume_alsa and wlan widget,
> > .xsession-errors is filling with:
> > 
> > awesome: draw_iso2utf8:81: text conversion failed: Invalid or incomplete
> > multibyte or wide character
> > 
> > And the clock widget is showing UTC instead of CEST. This was also the case for awesome's default clock, i.e. should not be related to the obvious widget lib.
> > 
> > Are these problems connected?
> > 
> > I use nix on-top of ubuntu 10.4.1, single-user setup all chowned to my user.
> > I only installed awesome and lua (to get the interpreter in ./bin)
> 
> There are no locales available except C, at least to lua and python:
> 
> % which lua
> /home/cfl/.nix-profile/bin/lua
> % lua
> Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> > print(os.setlocale('en_US.utf-8'))
> nil
> > print(os.setlocale('en_US.UTF-8'))
> nil
> > print(os.setlocale('en_US.ISO-8859-1'))
> nil
> > print(os.setlocale('C'))    
> C
> 
> The nil means, it failed to set the locale.
> 
> 
> % which python
> /home/cfl/.nix-profile/bin/python
> % python
> Python 2.7 (r27:82500, Aug 17 2010, 05:43:32) 
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import locale
> >>> locale.getdefaultlocale()
> ('en_US', 'UTF8')
> >>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/nix/store/f9y4kmb9lflqkgjwavlf8mjj06r3pxhq-python-2.7/lib/python2.7/locale.py", line 531, in setlocale
>     return _setlocale(category, locale)
> locale.Error: unsupported locale setting
> >>> locale.setlocale(locale.LC_ALL, 'C')                  
> 'C'
> 
> The getdefaultlocale() shows what is set in the environment, but to really use
> it, one needs to set it manually in python.
> 
> 
> I found documentation for nixos[1], but not for nix on some other
> system. In ubuntu (the host system) the locales are correctly configured
> and functional.
> 
> [1] http://hydra.nixos.org/build/586372/download/1/nixos/manual.html
> -- 
> Florian Friesdorf <flo at chaoflow.net>
>   GPG FPR: EA5C F2B4 FBBB BA65 3DCD  E8ED 82A1 6522 4A1F 4367
> Jabber/XMPP: flo at chaoflow.net
> IRC: chaoflow on freenode,ircnet,blafasel,OFTC



> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev




More information about the nix-dev mailing list