[Zope3-dev] Re: zope.tal.xmlparser.XMLParser() dislikes unicode

Dieter Maurer dieter at handshake.de
Wed Jan 17 16:49:11 EST 2007


Andreas Jung wrote at 2007-1-17 17:48 +0100:
> ...
>So Martijn's and my proposal remain. They are not very different. In the 
>end the behavior is almost identical. But I will adopt your suggestion to 
>remove
>the preamble when storing the data internally (basically to avoid a 
>possible encoding ambiguity).

In future times, the preamble might contain information which
should not be dropped, e.g. when there is an XML version
different from "1.0".

For PageTemplates, we know that the encoding information is probably
not relevant after the parsing -- unless we want to use it
as a default for the "Content-Type" charset but I doubt that this
is a good thing. If the "Content-Type"'s charset is given explicitely,
then the "encoding" of the XML declaration needs to be
adapted to this value during the serialization anyway -- thus
overriding any "encoding" present there.



-- 
Dieter


More information about the Zope3-dev mailing list