[maemo-developers] Python - problem with locales
From: Lauro Moura lauro.neto at openbossa.orgDate: Mon Oct 8 00:52:01 EEST 2007
- Previous message: Python - problem with locales
- Next message: Python - problem with locales
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10/6/07, David Hautbois <david.hautbois at free.fr> wrote: > Hi > > Thanks for your tips, but I still have problem : > > ***** unset LC_ALL > >>> import locale > >>> locale.getdefaultlocale() > (None, None) > > Error: > UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in > position 54: ordinal not in range(128) > > ***** export LC_ALL="en_US.UTF-8" (Like my debian workstation) > >>> locale.getdefaultlocale() > ('en_US', 'UTF8') > > Error: > UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in > position 54: ordinal not in range(128) > > ***** export LC_ALL="fr_FR.UTF-8" > >>> locale.getdefaultlocale() > ('fr_FR', 'UTF8') > > Error: > UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in > position 54: ordinal not in range(128) > Hi David, Could you paste the output of the following script to show LC_ALL, LC_CTYPES, LANG and LANGUAGE? http://pastebin.com/f16db283 My scratchbox shows LC_ALL=C and everything else undefined, leading to that UnicodeEncodeError. If I reproduce these values in my Ubuntu desktop, the same error occurs. To work correctly, I had to unset LC_ALL (bigger precedence) and set LANG to en_GB. PS: This still differs from ubuntu, where I had to set LANG to en_GB.UTF-8 (not just en_GB) and this config fails on scratchbox (I'm working on it). -- Lauro Moura
- Previous message: Python - problem with locales
- Next message: Python - problem with locales
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]