From: Oleg B. <ph...@ph...> - 2008-01-07 20:26:35
|
On Mon, Jan 07, 2008 at 03:13:18PM -0500, Glenn MacGregor wrote: > My mistake, not sure what happened, but when I set the charset=latin1 it > fails in the same place as it fails without the charset set. That is > cursors.py line 146 which encodes the query using latin1 in both cases, > means that mysql default charset for the connection is latin1. Very strange. The offending character can be decoded from latin1 without any problem: >>> unicode("\xc3", "utf-8") Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 0: unexpected end of data >>> unicode("\xc3", "latin1") u'\xc3' Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |