summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lxml/objectify.pyx2
-rw-r--r--src/lxml/tests/test_objectify.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lxml/objectify.pyx b/src/lxml/objectify.pyx
index 376695a8..791f2cf8 100644
--- a/src/lxml/objectify.pyx
+++ b/src/lxml/objectify.pyx
@@ -976,7 +976,7 @@ cdef _checkNumber(bytes_unicode s, bint allow_float):
cdef NumberParserState state = NPS_SPACE_PRE
for c in s:
- if c.isdigit() if (bytes_unicode is unicode) else c in b'0123456789':
+ if c in u'0123456789':
if state in (NPS_DIGITS, NPS_FRACTION, NPS_DIGITS_EXP):
pass
elif state in (NPS_SPACE_PRE, NPS_SIGN):
diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
index f50a3447..a62df852 100644
--- a/src/lxml/tests/test_objectify.py
+++ b/src/lxml/tests/test_objectify.py
@@ -2663,6 +2663,7 @@ class ObjectifyTestCase(HelperTestCase):
<s>t</s>
<s>f</s>
<s></s>
+ <s>²²²²</s>
<s>12_34</s>
<s>1.2_34</s>
<s>34E</s>