[Zope] Re: unicode and zope

Toby Dickenson tdickenson at geminidataloggers.com
Wed Feb 4 10:54:38 EST 2004

On Wednesday 04 February 2004 15:18, Andrew Altepeter wrote:
> (bringing this back on the list...)
> Hi Shan,
> It appears that the steps you outlined have solved my issue(s) too.

Youve probably swapped your original problems for a set of different ones. 
This does make some things easier so I understand the temptation to use it, 
but it is not a supported configuration for Zope or python :-(

> When the form is submitted
> with these unicode characters in it, my script raises a UnicodeError
> when ZMySQLDA apparrently attempts to change the encoding to ascii.

add a :utf8:ustring marshalling tag on the end of your field, and your 
variable will hold a unicode object.

unicode objects have a .encode() method, which will be useful if your database 
adapter needs an 8-bit string.

Toby Dickenson

More information about the Zope mailing list