On 1/15/07, Andreas Jung <[EMAIL PROTECTED]> wrote:
ok, got it. But this problem can be solved easily by changing the encoding
within the preamble.

I would say refusing to guess and bailing out with an error message is
better in this case. The Zen of Python:

In the face of ambiguity, refuse the temptation to guess.

applies very much in this case in my opinion. Changing the preamble is
too much like "do what I mean" to me - do we really know the developer
actually had any clue what they were doing when they somehow created
this unicode string with an encoding declaration? I'm not even sure I
know what it *means* to have a unicode serialized XML string with an
encoding declaration.

I already think we have code in lxml we can look at to base refusal to guess on.


Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to