Verified Commit 7691a04a authored by Mike Gabriel's avatar Mike Gabriel Committed by Andrej Shadura

Always return unicode from String8.parse_binary_value().

parent eb6ab272
......@@ -415,8 +415,14 @@ class String8(ValueField):
s = s.decode('UTF-8')
except UnicodeDecodeError:
pass # return as bytes
return s, data[slen:]
d = data[slen:]
try:
d = d.decode('UTF-8')
except UnicodeDecodeError:
pass
return s, d
class String16(ValueField):
structcode = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment