What is wrong? The minidom or the XML file?

Anthony Liu antonyliu2002 at yahoo.com
Wed Mar 10 20:30:22 EST 2004


Yes, I have installed CJKcodecs on my win2k.  OK,
finally I got something helpful.  So I'll try using
xmlproc or pxdom, which I am assuming understand the
GB encoding according to what you say, right?


--- Andrew Clover <and-google at doxdesk.com> wrote:
> Anthony Liu <antonyliu2002 at yahoo.com> wrote:
> 
> > The problem remains even if I try
> encoding="UTF-16" or
> > encoding="GB2312" or encoding="GBK" in the xml
> > document.
> 
> Indeed, expat doesn't understand some of the more
> complex (DBCS)
> encodings such as GB.
> 
> In any case, you'll need CJKCodecs to get GB
> support, if you haven't
> installed them already. (They'll be built-in in a
> forthcoming Python
> version.) See http://cjkpython.i18n.org/
> 
> Then you'll need to either:
> 
>   - read in the file and transcode it before passing
> to expat
>     via minidom.parseString, or,
> 
>   - use a pure-Python parser such as xmlproc (a
> validating parser)
>     or the one in pxdom.
> 
> -- 
> Andrew Clover
> mailto:and at doxdesk.com
> http://www.doxdesk.com/
> -- 
> http://mail.python.org/mailman/listinfo/python-list


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com




More information about the Python-list mailing list