[Zope] Zope newbie.... unicode problem
Dieter Maurer
dieter at handshake.de
Thu Nov 30 14:56:08 EST 2006
Tyler Nally wrote at 2006-11-29 15:49 -0500:
> ...
>When serving a web page, we get an error that involves the
>fetching and display of a document to the browser. Evidently,
>it's choking on some unicode bytes when it's expecting plain
>ascii.
Unfortunately, this is a *VERY* frequent problem.
It occurs when a template mixes unicode and some non unicode
string containing non ASCII characters.
There are several options:
* Do not use unicode at all -- always convert to something
like your "site encoding"
* Use unicode whenever you handle text
* Set Python's "defaultencoding" to your "site encoding"
(provided you have a consistent site encoding)
Searching the mailing list archives will show you hundreds of
similar threads and may give further information.
--
Dieter
More information about the Zope
mailing list