[issue27120] xmllib unable to parse in UTF8 format

2016-05-27 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27120] xmllib unable to parse in UTF8 format

2016-05-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue222587. Seems this was the reason why the xmllib module was 
deprecated.

Use the xml package for parsing XML (xml.etree.ElementTree, xml.dom.minidom, 
xml.sax, etc).

--
resolution:  -> wont fix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Enrico

Enrico added the comment:

I have attached xmllib.py. This file is in python23\lib folder.

The strings in XML file are in cyrillic language.

My code:
import xmllib

class Parser(xmllib.XMLParser):
# a simple styling engine

def __init__(self):
xmllib.XMLParser.__init__(self)
self.cursupervisore = None
self.curdata= ''

self.elements = {'Superv':(self.starttag_superv, self.endtag_superv)

}
def load(self, file):
while 1:
s = file.readline()

if not s:
break
self.feed(s)
self.close()

def read_plant_tree(filexml):
  c = Parser()
  c.load(filexml)

--
Added file: http://bugs.python.org/file42991/xmllib.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please provide minimal reproducer? Minimal script and minimal data 
that expose the issue.

--
nosy: +serhiy.storchaka
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27120] xmllib unable to parse in UTF8 format

2016-05-25 Thread Enrico

New submission from Enrico:

The xmllib.XMLParser seems to be unable to parse 
an XML file that contains cyrillic characters.


   File "xmllib.pyc", line 172, in feed
   File "xmllib.pyc", line 268, in goahead
   File "xmllib.pyc", line 798, in syntax_error
 Error: Syntax error at line 8: illegal character in content

--
components: XML
messages: 266322
nosy: enrico.terra...@scamesistemi.it
priority: normal
severity: normal
status: open
title: xmllib unable to parse in UTF8 format
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com