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

Steve Holden sholden at holdenweb.com
Mon May 6 17:34:23 EDT 2002


Erm, see below ...

"Steve Holden" <sholden at holdenweb.com> wrote in message
news:zGCB8.68290$v92.58938 at atlpnn01.usenetserver.com...
> 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)
#################################
This line should after the patch, of course, read

        self.len = len(self.buf)

so the code picks up the length of the string that the input has been
converted to.

regards
 Steve
--
Steve Holden: http://www.holdenweb.com/ ; Python Web Programming:
http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list