mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
[#3083] Fix missing common.utf8_encoded for backward compatibility
This commit is contained in:
parent
33e9545cd4
commit
9164dafe69
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,7 @@ import time
|
||||||
import chardet
|
import chardet
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
|
from deluge.decorators import deprecated
|
||||||
from deluge.error import InvalidPathError
|
from deluge.error import InvalidPathError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -921,6 +922,11 @@ def decode_bytes(byte_str, encoding='utf8'):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated
|
||||||
|
def utf8_encoded(s, encoding='utf8'):
|
||||||
|
decode_bytes(s, encoding).encode('utf8')
|
||||||
|
|
||||||
|
|
||||||
def utf8_encode_structure(data):
|
def utf8_encode_structure(data):
|
||||||
"""Recursively convert all unicode keys and values in a data structure to utf8.
|
"""Recursively convert all unicode keys and values in a data structure to utf8.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue