--On 15. Januar 2007 13:26:16 +0100 Martijn Faassen <[EMAIL PROTECTED]> wrote:
How would you propose to parse the following unicode string? u"<?xml version="1.0" encoding="ISO-8859-1"?><foo />"
If your parser is unicode-aware then the encoding of the preambledoes not matter since you have already unicode internally and can process your file totally on XML.
If your parser isn't unicode-aware then you will likely convert it toutf-8 and work internally with utf-8 encoded strings. In fact xml.parsers.expat since to support unicode (it can return unicode strings
to the handlers, see 'returns_unicode' property). However you need to reconstruct the XMl preamble when you reconstruct your XML from the parsed data. Or am I missing something? Andreas
Description: PGP signature
_______________________________________________ Zope3-dev mailing list Zope3firstname.lastname@example.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com