On 27/11/2007, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Tue, Nov 27, 2007 at 02:43:06PM +0100, Markus Gritsch wrote: > > On 27/11/2007, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > > if self.need_unicode and not isinstance(query, unicode): > > > - try: > > > - query = unicode(query, self.encoding) > > > - except UnicodeError: > > > - pass > > > + query = unicode(query, self.encoding) > [skip] > > However, this silently swallowing of an UnicodeError was introduced > > from 0.9.1 -> 0.9.2 and I don't see what bug this solves. > > I think it was added to solve problems with BLOBs, to pass the query > string unmodified down to MySQLdb (I don't know how MySQLdb reacts to > a non-unicode query string now).
But if a BLOB contains just bytes which do *not* trigger the Exception, the BLOB in the query *does* get converted to unicode, and I doubt this would be the desired behavior. Markus ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss