[BangPypers] Handling unicode characters in xml.dom

Gurpreet Sachdeva gurpreet.sachdeva at gmail.com
Tue Mar 18 06:35:05 CET 2008


<?xml version="1.0" encoding="UTF-8"?>

Still the problem exists.

- Gurpreet

On Tue, Mar 18, 2008 at 10:44 AM, Anand Balachandran Pillai <
abpillai at gmail.com> wrote:

> What is the encoding of your XML file ? i.e in the
> string "<?xml version="1.0" encoding="<encoding>"?>,
> what is <encoding> ?
>
> Make sure it is an encoding like utf-8 or iso-8859-1
> which can help the parser to understand garbage
> chars.
>
> --Anand
>
>
> On Tue, Mar 18, 2008 at 10:38 AM, Gurpreet Sachdeva
> <gurpreet.sachdeva at gmail.com> wrote:
> > Hi,
> >
> > Any idea how to handle the unicode characters existing in an xml file
> while
> > parsing it.
> >
> > This is what I am doing:
> >
> > from xml.dom import minidom
> >
> > xmlObj = minidom.parse(fileobj)
> >
> > And the script throws an error because of some special characters ['f
> > (3gpÕ¡¤ë'] present in the xml file. Any suggestion/pointers would be
> > appreciated
> >
> > Thanks and Regards,
> > Gurpreet Singh
> > _______________________________________________
> >  BangPypers mailing list
> >  BangPypers at python.org
> >  http://mail.python.org/mailman/listinfo/bangpypers
> >
> >
>
>
>
> --
> -Anand
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
Thanks and Regards,
Gurpreet Singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/bangpypers/attachments/20080318/78e84afc/attachment.htm 


More information about the BangPypers mailing list