etree.fromstring with a UTF-32 encoded string fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
Unassigned |
Bug Description
I am trying to pass a UTF-32 encoded string (with the XML encoding declaration) to lxml.etree.
Is this expected? Following the same process for all other encodings that I have tested works fine (UTF-8, UTF-16, ASCII, ISO-8859-1, ISO-8859-2, BIG5, EUC-JP).
I have not tested this in libxml2 as I do not know how to.
Python : sys.version_
lxml.etree : (3, 8, 0, 0)
libxml used : (2, 9, 4)
libxml compiled : (2, 9, 4)
libxslt used : (1, 1, 29)
libxslt compiled : (1, 1, 29)
from lxml import etree
foo = """<?xml version='1.0' encoding=
etree.fromstrin
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "src/lxml/
File "src/lxml/
File "src/lxml/
File "src/lxml/
File "src/lxml/
File "src/lxml/
File "src/lxml/
File "<string>", line 1
lxml.etree.
Changed in lxml: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in lxml: | |
status: | Fix Committed → Fix Released |
Implemented in /github. com/lxml/ lxml/commit/ e06b4b4f2d246d5 c31d298a4649485 01b8a5dd91
https:/