[Zope3-Users] Creating XML using Pagetemplates doesn't work
Frank Burkhardt
fbo2 at gmx.net
Wed Mar 1 11:22:28 EST 2006
Hi,
I wrote a view that returns a Atom-document (comparable to RSS). The
content type is 'application/atom+xml'. Unfortunately the pagetemplate
inserts some strings containing german umlauts (non-ascii) and I
get this error:
ValueError: Unicode results must have a text content type.
I found this line in zope.publisher.http:
if not content_type.startswith('text/'):
raise ValueError(
[...]
which explains everything.
I tried to insert the umlauts in HTML notation (e.g. 'ü') but
zope outsmarted me and escaped the '&' :-( .
My Question is: What is the best way (tm) to handle that?
Regards,
Frank
More information about the Zope3-users
mailing list