Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error



"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:

locale._parse_localename("en_US.UTF-8@euro")
('en_US', 'utf_8_euro')

The function first normalizes the "@" away and then looks for it. Is that
the expected behaviour?

Peter
.



Relevant Pages

  • Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
    ... sql = unicode ... At the application (DABO) mailing list, they have pointed that this has ... It's definitely not a Python issue. ... The problem is that self.Encoding is incorrect - it should not be ...
    (comp.lang.python)
  • Re: Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
    ... line 281, in execute ... sql = unicode ... At the application (DABO) mailing list, they have pointed that this has ... to be a Python issue. ...
    (comp.lang.python)
  • Python 2.5.2 on Ubuntu Hardy Utf-8-Euro error
    ... I'm playing with an application framework (or kinda) that's developed ... sql = unicode ... At the application (DABO) mailing list, they have pointed that this has ... to be a Python issue. ...
    (comp.lang.python)
  • Re: Dabo in 30 seconds?
    ... >> You might want to look at Dabo, which is a database application ... >> framework for Python. ... The wizard isn't the only way to create Dabo apps, ... The framework then takes care of populating the controls with the ...
    (comp.lang.python)
  • ChiPy (Special) Meeting, Tuesday 14th 5:30 pm.
    ... This is a special meeting on next Tuesday in addition to our ... Dabo is an open-source framework for developing desktop (i.e., ... client) applications in Python. ... ChiPy is a proud sponsor of many Open Source and Educational ...
    (comp.lang.python)