[XML-SIG] "encoding" argument to xml.dom.minidom.toxml()?

Bob Kline bkline at rksystems.com
Tue Jun 10 23:51:12 CEST 2008

Stefan Behnel wrote:
> Hi,
> Bill Janssen wrote:
>>> Well, what did you expect? That it magically transmogrifies your non-ASCII
>>> data into plain ASCII data?
>> Yep.  And there's no reason I can see why it can't do exactly that.  I
>> think the "encoding" argument should either be removed, or made to
>> work.
> That's why I asked if you tried other encodings. Obviously, you only tried
> "UTF-8" and "ASCII". There's tons of other encodings out there, and I bet they
> work just fine - as does "ASCII" (for ASCII data, that is).
> Stefan

I suspect there's a certain amount of unarticulated assumptions on both 
sides of this exchange.  I'm guessing that Bill might be thinking 
something like: "it's possible to represent any Unicode character in XML 
as &#<code-position-for character>"; and was hoping that the method 
would do just that for the non-ASCII characters if he asks for ASCII 
encoding.  Stefan is (if he even realizes that Bill might be thinking 
this) himself possibly thinking "no way is the method going to do that 
much work for the caller."  Of course, I realize that it's always risky 
trying to guess what people are thinking, but I throw this out as a 
possibility in the hopes that, if I turn out to be right for even just 
one side of the exchange, this might help clear the air a little bit. :-)

Bob Kline
mailto:bkline at rksystems.com

More information about the XML-SIG mailing list