RE: gnue-common bug: mysqldbdrv.py with MySQLdb 1.2.2 always decodes query result using latin1

Johannes Vetter <[email protected]> Thu, 12 Jul 2007 10:22:13 +0200
Newsgroups gmane.comp.gnu.enterprise.general
Organization ByteWise Software GmbH
Message-ID <[email protected]>
Hi Oleg,

I'm lacking a MySQLdb 1.2.2 driver as well as a MySQL 5 Server here, so
I cannot reproduce your problem or verify your patch.

But the value for "self._encoding" is taken from your connections.conf.
If there is no such value provided, it will default to "utf-8".  This
value will be used for all encoding and decoding of the unicode values
in use.

So if you appear to have everything encoded/decoded in latin-1 you're
likely having an "encoding=latin-1 (or iso8859-1)" in your
connections.conf (for that connection).

Aside from that, your patch suggests setting the charset via keyword
instead of performing an explicit "SET NAMES" when using a MySQL 5+.  As
you've mentioned this works fine with the MySQLdb 1.2.2 driver.  Can you
check this with a MySQLdb 1.2.1 driver ?  If it works there too, we can
integrate your patch.


Thanks for your suggestions,

Have a nice day

Johannes
-- 
BYTEWISE Software GmbH               Tel +43 (5577) 63377
i.A. Johannes Vetter                 Fax +43 (5577) 63381
A-6890 Lustenau, Enga 2              http://www.bytewise.at
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Individuelle Datenbanklösungen für GNU/Linux, Windows und
Mac OSX: http://www.bytewise.at/leistungen/gnue-indiv.html

_______________________________________________
Gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnue
signature.asc (application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBGleS1VTjHnzKwdk0RApuUAJ9VLhg7mVh70uv9ZBWy6Ta+6H9UkgCglwCI
E30ACCfwyxYV0qQ477WP5HE=
=/AkA
-----END PGP SIGNATURE-----