Skip to content

Commit

Permalink
Update ustr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjiangjie authored and tzutalin committed Jan 4, 2019
1 parent d27e6a5 commit a0fa187
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/ustr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ def ustr(x):
if type(x) == str:
return x.decode(DEFAULT_ENCODING)
if type(x) == QString:
return unicode(x)
#https://blog.csdn.net/friendan/article/details/51088476
#https://blog.csdn.net/xxm524/article/details/74937308
return unicode(x.toUtf8(), DEFAULT_ENCODING, 'ignore')
return x
else:
return x

0 comments on commit a0fa187

Please sign in to comment.