parent
2fe457e496
commit
9786aab050
1 changed files with 3 additions and 0 deletions
|
@ -954,4 +954,7 @@ def tryDecode(string, encoding='utf-8'):
|
||||||
string = string.decode(encoding, "ignore")
|
string = string.decode(encoding, "ignore")
|
||||||
except TypeError:
|
except TypeError:
|
||||||
string = string.decode()
|
string = string.decode()
|
||||||
|
except UnicodeEncodeError:
|
||||||
|
# Already in unicode - e.g. sometimes file paths
|
||||||
|
pass
|
||||||
return string
|
return string
|
||||||
|
|
Loading…
Reference in a new issue