Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cebbc8a

Browse files
authored
Merge pull request ernw#13 from GSam/develop
Use the correct length in text for parsing
2 parents 2e4122f + 65bdf46 commit cebbc8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wcf/xml2records.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _parse_data(self, data, is_cdata=False):
166166
return DateTimeTextRecord(dt, tz)
167167

168168
# text as fallback
169-
val = len(data)
169+
val = len(data.encode('utf-16le'))
170170
if val < 2**8:
171171
return UnicodeChars8TextRecord(data)
172172
elif val < 2**16:

0 commit comments

Comments
 (0)