Skip to content

Commit a0fa187

Browse files
yangjiangjietzutalin
authored andcommitted
Update ustr.py
1 parent d27e6a5 commit a0fa187

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/ustr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ def ustr(x):
99
if type(x) == str:
1010
return x.decode(DEFAULT_ENCODING)
1111
if type(x) == QString:
12-
return unicode(x)
12+
#https://blog.csdn.net/friendan/article/details/51088476
13+
#https://blog.csdn.net/xxm524/article/details/74937308
14+
return unicode(x.toUtf8(), DEFAULT_ENCODING, 'ignore')
1315
return x
1416
else:
1517
return x

0 commit comments

Comments
 (0)