[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-30 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: Could someone close this? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5036 ___ ___

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-30 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5036 ___

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-27 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: From msg80438 You should reset it by self.data = '' at end_element(). It seems that we should reset it at start_element() like this, def start_element(self, name, attrs): ...abbr... if name == 'link':

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread HiroakiKawai
HiroakiKawai ka...@apache.org added the comment: The sample code has bug. expat is OK. Method char_data must append the incoming characters because the character sequence is an buffered input. def char_data(self, data): self.data += data You should reset it by self.data = '' at

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: Hi kawai. I got correct output by modifying the code like you say, but I still cannot understand why this happens. Could you tell me more briefly, or point any documents about it? I can't find any notes which say don't pass strings but

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread HiroakiKawai
HiroakiKawai ka...@apache.org added the comment: That's the spec of XML SAX interface. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5036 ___ ___

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread HiroakiKawai
HiroakiKawai ka...@apache.org added the comment: Please read The ContentHandler.characters() callback is missing data! http://www.saxproject.org/faq.html and close this issue :) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5036

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-24 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: a mistake of my former message, briefly - in detail Please read The ContentHandler.characters() callback is missing data! http://www.saxproject.org/faq.html I was just reading above site. it is now very clear for me. Thanks kawai and I'm

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-23 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: If the xml file is small enough, could you attach it to the issue? Or provide a download location? I could not find it myself (without downloading the whole package) (Note that Python 2.5 only gets security fixes now, so unless this

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-23 Thread Takeshi Matsuyama
Takeshi Matsuyama tksmas...@gmail.com added the comment: Thanks for reply! If the xml file is small enough, could you attach it to the issue? Or provide a download location? Sorry, I found here.

[issue5036] xml.parsers.expat make a dictionary which keys are broken if buffer_text is False.

2009-01-22 Thread Takeshi Matsuyama
New submission from Takeshi Matsuyama tksmas...@gmail.com: When I make a dictionary by parsing legacy-icon-mapping.xml(which is a part of icon-naming-utils[http://tango.freedesktop.org/Tango_Icon_Library]) with the following script, the three keys of the dictionary are collapsed if the