From: Oleg B. <ph...@ph...> - 2007-11-27 16:22:56
|
On Tue, Nov 27, 2007 at 07:16:16PM +0300, Oleg Broytmann wrote: > On Tue, Nov 27, 2007 at 06:08:31PM +0200, Dan Pascu wrote: > > So I think we should: > > 1. get rid of the try/except Sorry, sent that to fast. > The point taken. Thank you! But... > > 2. only use the connection encoding to encode strings / string values > > 3. use latin1 to encode/decode blobs that ensures that they are sent > > unmodified to the db Alas, the code in question is in MySQLConnection, long past all converters had worked. The connection got a query string. All connection classes just pass the string down to their DB API drivers, but MySQLdb requires (?) unicode so MySQLConnection converts the query string to unicode. There is no way to distinguish integers, strings, unicode or BLOBs here. Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |