Skip to content

Commit

Permalink
better u method in legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Nov 8, 2014
1 parent ee6bbfd commit 8da1ce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/netius/base/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def orderable(value):
if not PYTHON_3: return value
return Orderable(value)

def u(value):
def u(value, encoding = "utf-8"):
if PYTHON_3: return value
return value.decode("unicode_escape")
return value.decode(encoding)

def is_str(value):
return type(value) == _str
Expand Down

0 comments on commit 8da1ce7

Please sign in to comment.