Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- From: Peter Otten <__peter__@xxxxxx>
- Date: Fri, 30 May 2008 17:41:57 +0200
Josep wrote:
I'm playing with an application framework (or kinda) that's developed
with python, and it throws this error:
File
"/usr/lib/python2.5/site-packages/Dabo-0.8.3-py2.5.egg/dabo/db/dCursorMixin.py",
line 281, in execute
sql = unicode(sql, self.Encoding)
LookupError: unknown encoding: utf_8_euro
At the application (DABO) mailing list, they have pointed that this has
to be a Python issue. As I'm a totally python newbie, I would ask if
somebody has experimented this kind of error, and if there is any known
solution. I've found no clue searching at Google right now.
My Python version is 2.5.2, Ubuntu Hardy .deb package.
Python might get confused by an @EURO suffix in the locale:
$ LANG=de_DE.UTF-8@EURO
$ python -c"import locale; print locale.getdefaultlocale()"
('de_DE', 'utf_8_euro')
Try setting the LANG environment variable to something like
$ LANG=de_DE.UTF-8
$ python -c"import locale; print locale.getdefaultlocale()"
('de_DE', 'UTF8')
before you run your program (use ca_ES or whatever you need instead of
de_DE).
Peter
.
- Follow-Ups:
- Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- From: M.-A. Lemburg
- Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- References:
- Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- From: Josep
- Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- Prev by Date: Re: How to covert ASCII to integer in Python?
- Next by Date: Re: Python and Flaming Thunder
- Previous by thread: Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- Next by thread: Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- Index(es):
Relevant Pages
|