13 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: MySQL encoding problems
FromSent OnAttachments
Raoul Snyman25 Jul 2008 02:33 
jason kirtland25 Jul 2008 09:22 
Raoul Snyman27 Jul 2008 13:42 
Philip Semanchuk27 Jul 2008 14:17 
Raoul Snyman28 Jul 2008 02:23 
Philip Semanchuk28 Jul 2008 06:15 
Raoul Snyman30 Jul 2008 03:01 
Raoul Snyman07 Aug 2008 05:45 
jason kirtland07 Aug 2008 14:18 
Raoul Snyman11 Aug 2008 07:12 
jason kirtland11 Aug 2008 07:21 
Raoul Snyman13 Aug 2008 00:15 
jason kirtland13 Aug 2008 11:02 
Subject:[sqlalchemy] Re: MySQL encoding problems
From:Raoul Snyman (raou@gmail.com)
Date:07/30/2008 03:01:29 AM
List:com.googlegroups.sqlalchemy

I did some more digging on this issue, and found the following:

On the server:

raoul@dev ~ $ python Python 2.5.2 (r252:60911, Jul 29 2008, 09:55:12) [GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7. on linux2 Type "help", "copyright", "credits" or "license" for more information.

import MySQLdb connection = MySQLdb.connect(host='devdb', user='mysql', passwd='********',
db='news') cursor = connection.cursor() cursor.execute("SELECT VERSION()") 1L cursor.execute(u"SELECT VERSION()")

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "build/bdist.linux-i686/egg/MySQLdb/cursors.py", line 149, in execute LookupError: unknown encoding: latin1_swedish_ci

On my mac:

raoul@mymac:raoul $ python Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import MySQLdb connection = MySQLdb.connect(host='devdb', user='mysql', passwd='********',
db='news') cursor = connection.cursor() cursor.execute("SELECT VERSION()") 1L cursor.execute(u"SELECT VERSION()") 1L

So it looks like my connection is fine, but somehow the server's version of MySQLdb can't seem to decode the Unicode. Perhaps there's a problem with the libraries?

/me goes to do some more investigations...