mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +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 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…
Add table
Reference in a new issue