Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro 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.

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().

Regards,
Martin
.



Relevant Pages

  • Re: Linq to Python
    ... paradigm's big idea is to use a python + SQL type syntax to access data ... Simple LINQ expressions like the one you gave map easily to Python list ... I'm not overly keen on SQL syntax: I think this sort of complex expression ...
    (comp.lang.python)
  • Re: Was sollte man lernen?
    ... dass du SQL mit dem DBMS verwechselst? ... Dann nehme ich Python und generiere die neue Datei ... Die Länge von 2 byte pro Zeichen mach Probleme, ... der mit Algol 60 und Lochkarten programmieren gelernt hat. ...
    (de.comp.lang.misc)
  • Re: SQL, lite lite lite
    ...  'sqllite3' statements are valid SQL expressions, ... how and whether it can include arbitrary Python ... whether to permit transactions; and what the simplest and coolest ... thing you can do with a little Python syntax is. ...
    (comp.lang.python)
  • SQL, lite lite lite
    ... There are some options, such as 'sqllite3', but they are not ... 'sqllite3' statements are valid SQL expressions, ... how and whether it can include arbitrary Python ... thing you can do with a little Python syntax is. ...
    (comp.lang.python)
  • Re: Deviation from object-relational mapping (pySQLFace)
    ... It provides callable command objects for each sql query. ... I really don't see the point of XML for something as simple as specifying a SQL query and a couple metadata. ... This would be better done directly in Python using a metaclass, inheritance and a couple class attributes, ie: ...
    (comp.lang.python)