On 22 Jun 2006, at 05:56, isaac wrote:
> I just do everything in Unicode. > That does make a lot of sense. What has confused me is that a) the behaviour is different in different db drivers http://maxischenko.in.ua/blog/entries/89/sqlobject-unicode-and-ascii- error/ and, b) I expected validators.String() to return a string, not a Unicode string There seem to be various little corners that catch one out with unicode support in the db drivers. For example, this one that caught me: With SQLObject and MySQL-Python 1.2.1, a create call that generates the SQL "INSERT INTO location (city, domain, country, isp, zipcode, longitude, ip_id, latitude) VALUES ('LINKöPING', 'TELIA.COM', 'SWEDEN', 'TELIA NETWORK SERVICES', NULL, 15.617000000000001, 39, 58.417000000000002)" gives the following error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 100: ordinal not in range(128) With MySQL-Python 1.2.0 this works. (this is on OS X, and the city field is declared as a UnicodeCol) Arthur -- One secret of happiness is to ignore comparisons with people who are more successful than you are: always compare downwards, not upwards” - Richard Layard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears -~----------~----~----~----~------~----~------~--~---

