mx odbc result strings with special characters?
Alexander Jerusalem
ajeru at vknn.org
Sun Mar 3 14:00:33 EST 2002
Ok, thanks for your reply. Here's my output:
>>> import mx.ODBC.Windows as odbc
>>> con = odbc.connect("se", "scienceexile", "x")
>>> c = con.cursor()
>>> c.execute("select * from country")
>>> print c.fetchone()
('aa1', '\xd6sterreich-Ungarn', None, None)
>>> c.close()
>>> con.close()
And it's the same when I write the resultset to a file, so I don't
believe that it's just a display problem. The data comes from an
oracle database and the encoding and stringformat settings don't seem
to have any effect.
Alexander
Gerhard Häring <gh_pythonlist at gmx.de> wrote in message news:<mailman.1015125072.16815.python-list at python.org>...
> Le 02/03/02 à 18:50, Alexander Jerusalem écrivit:
> > Hi,
> >
> > I'm using the mxODBC package to query a database that contains german
> > umlauts. The result strings conatain hex codes instead of umlauts.
> > I've played around with encoding and stringformat values but to no
> > avail. Any hints?
>
> Yes. Post an example from an interactive Python session.
>
> It's not unlikely that everything is just fine but your terminal doesn't
> show the umlauts.
>
> Gerhard
More information about the Python-list
mailing list