On Thu, Feb 22, 2007 at 09:01:44AM +0100, [EMAIL PROTECTED] wrote: > myquery = unicode(query, self.encoding) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 33: > ordinal not in range(128)
This is what I suspected - MySQLdb 1.2.1 that insists on using unicode. > I now found that adding > > sqlobject.sqlhub.processConnection.encoding = 'iso8859-1' > > to the code resolves the errors. What exactly am I doing with this? Is it > even legal? :-) It is legal, but it is only the second half of the solution. You'd better pass the encoding to the connection constructor so it passes it further down to MySQLdb connection. You can do it using connection string: URI = "mysql://host/db?charset=iso8859-1&sqlobject_encoding=iso8859-1" (It seems "charset" and "sqlobject_encoding" are always equal, so the patch http://sourceforge.net/tracker/index.php?func=detail&aid=1653898&group_id=74338&atid=540674 unifies them.) Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
