Merge "Use to_utf8() instead of safe_encode() in convert_str()"

This commit is contained in:
Jenkins 2016-05-06 21:59:56 +00:00 committed by Gerrit Code Review
commit 530afcaee1

View File

@ -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')