[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-24 Thread Facundo Batista
Facundo Batista added the comment: CharacterData.__repr__ was constructing a string in response that keeped having a non-ascii character. Fixed in rev 58641. -- resolution: works for me -> fixed __ Tracker <[EMAIL PROTECTED]>

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-24 Thread Facundo Batista
Changes by Facundo Batista: Removed file: http://bugs.python.org/file8560/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list U

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-24 Thread Facundo Batista
Changes by Facundo Batista: Removed file: http://bugs.python.org/file8559/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list U

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-19 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: The fact that the problem occurs only from the command line and not when run from a script indicates that the real issue is in trying to print the object. Sure enough, if you modify the script to do repr(mydom.firstChild.childNodes), it gets the same proble

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-18 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I forgot to show dom.py source. marvin:cpython$ cat dom.py import xml.dom.minidom as dom data = open('testdata.txt','r').read() mydom = dom.parseString(data) mydom.firstChild.childNodes __ Tracker <[EMAIL PROTECTED]>

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-18 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: When I run the code in a script, I don't get the error. *** marvin:cpython$ python Python 2.5 (r25:51908, Jan 24 2007, 12:48:15) [GCC 4.1.0 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> impo

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Sharmila Sivakumar
Sharmila Sivakumar added the comment: Oops Facundo, that will work. It actually fails * after the dom construction* when you do mydom.firstChild.childNodes I request you to try it again. The prob is there is some encoding and decoding done within the parser, and it uses the default encoding

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Sharmila Sivakumar
Sharmila Sivakumar added the comment: Thanks for your quick response Facundo. I'm working on Ubuntu 7.04, python 2.5.1 Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 This error occurs when the default encoding is 'ascii'. When I change the default

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Facundo Batista
Facundo Batista added the comment: Downloaded the testdata.txt file, and yes, it's UTF-8: [EMAIL PROTECTED]:~/devel$ file testdata.txt testdata.txt: UTF-8 Unicode text But I opened it perfectly! Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Ty

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Sharmila Sivakumar
New submission from Sharmila Sivakumar: I try to load the data in the testdata.txt file into a dom. I tried import xml.dom.minidom as dom data = open('testdata.txt','r').read() mydom = dom.parseString(data) I get the following error >>> mydom.firstChild.childNodes Traceback (most recent call l