XML: minidom toxml() does not work for non English files! :-(

Fernando Pérez fperez528 at yahoo.com
Mon May 6 17:41:51 EDT 2002


Steve Holden wrote:

> Well, at the start of the __init__ we see:
> 
>         self.buf = str(buf)
>         self.len = len(buf)
> 
> This is clearly wrong, and the second line should be
> 
>         self.len = len(buf)
> 

You mean

        self.len = len(self.buf)

right?

It definitely looks like a bug though, esp. in light of what the docstring 
says:

buf = f.read()      # read until EOF

which of course doesn't happen with the current version. Without access to the 
fix (if you don't have root privileges), using the getvalue() method is a 
viable workaround in most cases.

Cheers,

f.



More information about the Python-list mailing list