mirror of https://github.com/flaggo/pydu.git
add preferredencoding to string
This commit is contained in:
parent
fd9b5d7da5
commit
fcc01429cf
|
@ -1,7 +1,11 @@
|
|||
# coding: utf-8
|
||||
import locale
|
||||
from .compat import text_type
|
||||
|
||||
|
||||
preferredencoding = locale.getpreferredencoding()
|
||||
|
||||
|
||||
def safeunicode(obj, encoding='utf-8'):
|
||||
"""
|
||||
Converts any given object to unicode string.
|
||||
|
|
Loading…
Reference in New Issue