Robin Haswell schrieb: > Stefan Meretz wrote: >> Both, PMA and MySQL, support Unicode. > > Good to hear you fixed your problem, although I'd be wary of how much > Unicode support MySQL has. > > Example: > > Create a table with a column defined as varchar(4), with one of the > Unicode collations. > > Insert 'öööö' into the column, then select it out again. > > You'll find your select result only contains 'öö'. This is because MySQL > varchar(4) means 4 *bytes*, not characters (and ö is two bytes). It's > not multibyte character aware.
This is standard behaviour even with oracle. As the dimensions of a text column have to have an upper limit for efficiency reasons, you can either use a fixed-width encoding like ucs2 or even ucs4, wasting awfully lots of bytes, or you have to cap the size. > This can cause lots of exceptions in Python when multibyte characters > are truncated at the size limit of a column. When Python sees half a > multibyte character, an exception is raised. Not necessarily, you can alter the decoding so that it silently discards unknown bytes. I'm not sure how that is working with a DB-adapter though. Diez --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---

