Stefan Behnel schrieb am 02.03.23 um 08:50:
Am March 1, 2023 3:15:22 PM UTC schrieb holger.jo...@lbbw.de:
Probably a bug in _checkNumber():
https://github.com/lxml/lxml/blob/d01872ccdf7e1e5e825b6c6292b43e7d27ae5fc4/src/lxml/objectify.pyx#L974

Ah, yes, it might be the isdigit() check, actually. That could be too broad. 
Not every digit is a valid part of a number.

Thanks for the report and the investigation. I'll try a fix when I get to it.

According to the XML Schema 1.1 spec, it's really just [0-9] that we should detect.

https://www.w3.org/TR/xmlschema11-2/#decimal

I'll remove the ".isdigit()" check all together and only leave the '0-9' comparison in there. Even when we're parsing Unicode strings, we should only care about XML numbers, not everything that Python accepts.

Stefan

_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: arch...@mail-archive.com

Reply via email to