Merge "Use to_utf8() instead of safe_encode() in convert_str()"
This commit is contained in:
commit
530afcaee1
@ -824,7 +824,7 @@ def convert_str(text):
|
|||||||
* convert to Unicode on Python 3: decode bytes from UTF-8
|
* convert to Unicode on Python 3: decode bytes from UTF-8
|
||||||
"""
|
"""
|
||||||
if six.PY2:
|
if six.PY2:
|
||||||
return encodeutils.safe_encode(text)
|
return encodeutils.to_utf8(text)
|
||||||
else:
|
else:
|
||||||
if isinstance(text, bytes):
|
if isinstance(text, bytes):
|
||||||
return text.decode('utf-8')
|
return text.decode('utf-8')
|
||||||
|
Loading…
Reference in New Issue
Block a user