[Nix-dev] awesome locale issues
Florian Friesdorf
flo at chaoflow.net
Mon Aug 23 21:02:42 CEST 2010
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20100823/e8d8cff8/attachment.bin
More information about the nix-dev
mailing list