From a0fa187eff4ea465fb24c5b7c6bdd619d043d706 Mon Sep 17 00:00:00 2001 From: yangjiangjie <1192322386@qq.com> Date: Fri, 4 Jan 2019 12:02:26 +0800 Subject: [PATCH] Update ustr.py --- libs/ustr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ustr.py b/libs/ustr.py index 76bdf4cb..511e68b5 100644 --- a/libs/ustr.py +++ b/libs/ustr.py @@ -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