[maemo-developers] Python - problem with locales
From: David Hautbois david.hautbois at free.frDate: Sat Oct 6 12:02:51 EEST 2007
- Previous message: Python - problem with locales
- Next message: Python - problem with locales
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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) What to do ?? Thanks. David. luciano.wolf at indt.org.br wrote: > > Hi David, > > To resolve locale, Python uses LC_ALL, LC_CTYPES, LANG and LANGUAGE in > this order. SDK3.3 sets LC_ALL=C giving (None,None) as result to > getdefaultlocale(). SDK2.2 and N800 leaves LC_ALL clean, then if you set > LANGUAGE everything goes fine. By now you can "unset LC_ALL" to resolve > this problem. > > Regards, > Luciano > > > -----Original Message----- > From: maemo-developers-bounces at maemo.org on behalf of ext David Hautbois > Sent: Fri 05-Oct-07 17:33 > To: maemo-developers at maemo.org > Subject: Python - problem with locales > > Hi > I have problems to display special characters in the python console > (With Scratchbox) : > UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in > position 54: ordinal not in range(128) > > I think this is because the following command : > locale.getdefaultlocale() > return > (None, None) > > I didn't have this issue with maemo 3.1 SDK. > > How to solve this issue ? > > Thanks > > David. > > -- > http://david.hautbois.free.fr > http://slugplayer.free.fr > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > -- http://david.hautbois.free.fr http://slugplayer.free.fr
- Previous message: Python - problem with locales
- Next message: Python - problem with locales
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]