[#3083] Fix missing common.utf8_encoded for backward compatibility
This commit is contained in:
parent
33e9545cd4
commit
9164dafe69
|
@ -28,6 +28,7 @@ import time
|
|||
import chardet
|
||||
import pkg_resources
|
||||
|
||||
from deluge.decorators import deprecated
|
||||
from deluge.error import InvalidPathError
|
||||
|
||||
try:
|
||||
|
@ -921,6 +922,11 @@ def decode_bytes(byte_str, encoding='utf8'):
|
|||
return ''
|
||||
|
||||
|
||||
@deprecated
|
||||
def utf8_encoded(s, encoding='utf8'):
|
||||
decode_bytes(s, encoding).encode('utf8')
|
||||
|
||||
|
||||
def utf8_encode_structure(data):
|
||||
"""Recursively convert all unicode keys and values in a data structure to utf8.
|
||||
|
||||
|
|
Loading…
Reference in New Issue