We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1ae813 commit c4e2c03Copy full SHA for c4e2c03
mirror/common.py
@@ -292,6 +292,9 @@ def utf8_encoded(s, encoding="utf8"):
292
Return a utf8 encoded string of s
293
294
"""
295
+ if is_python3():
296
+ return decode_string(s, encoding).encode("utf8") if isinstance(s, bytes) else s.encode("utf8")
297
+
298
if isinstance(s, str):
299
s = decode_string(s, encoding).encode("utf8")
300
elif isinstance(s, unicode):
0 commit comments