you need to get a handle on exactly what is in that column. a small test program which retrieves it and prints it out (using no conversion) is a good place to start.
are you using MySQL ? it seems like MySQL can sometimes do the UTF-8 encoding on the way in automatically depending on client settings, which if combined with SA's encoding, blows things up. On Oct 23, 2006, at 2:31 PM, Alexandre CONRAD wrote: > > Hello, > > I seem to have a unicode issue since I updated to 0.3. I'm using > Pylons > (with Myghty templates), and I have problems reading unicode data > from a DB. > > When my engine is set as "convert_unicode=True", I seem to get an > SA error: > > [...] > Module sqlalchemy.types:175 in convert_result_value > Module encodings.utf_8:16 in decode > errors 'strict' > input '\xc5LAND ISLANDS' > return codecs.utf_8_decode(input, errors, True) > exceptions.UnicodeDecodeError: 'utf8' codec can't decode bytes in > position 0-1: invalid data > > All my Columns() are String(). > > When I set "convert_unicode=False", I seem to have a Myghty write > error. > > Error(UnicodeDecodeError): 'ascii' codec can't decode byte 0xc5 in > position 0: ordinal not in range(128) > > I don't seem to have problems inserting the data in the DB. > > I had this problem before using 0.2.8, but putting > "convert_unicode=True" to my engine() fixed the problem. > > Any idea ? > > Regards, > -- > Alexandre CONRAD - TLV FRANCE > Research & Development > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~----------~----~----~----~------~----~------~--~---
