Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- From: Peter Otten <__peter__@xxxxxx>
- Date: Fri, 30 May 2008 20:25:57 +0200
"Martin v. Löwis" wrote:
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.
It's definitely not 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.
The problem is that self.Encoding is incorrect - it should not be
utf_8_euro. Instead, it should be UTF-8 (or perhaps utf_8). DABO
shouldn't use locale.getdefaultlocale()[1], but
locale.getpreferredencoding().
I think that is the effect of a bug:
('en_US', 'utf_8_euro')locale._parse_localename("en_US.UTF-8@euro")
The function first normalizes the "@" away and then looks for it. Is that
the expected behaviour?
Peter
.
- Follow-Ups:
- Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- From: "Martin v. Löwis"
- 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
- Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- From: "Martin v. Löwis"
- Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
- Prev by Date: Re: Help needed in choosing an algorithm for Cryptographic services.
- Next by Date: Re: Generating event from event
- 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
|