Skip to content

Commit 382a7be

Browse files
committed
Fixed UTF-8 encoding problem
- Version 4.3.7
1 parent 23cd8f6 commit 382a7be

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

AndroidViewClient/src/com/dtmilano/android/viewclient.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '4.3.2'
21+
__version__ = '4.3.7'
2222

2323
import sys
2424
import subprocess
@@ -1763,8 +1763,7 @@ def __traverse(root, indent="", transform=View.__str__, stream=sys.stdout):
17631763

17641764
s = transform(root)
17651765
if s:
1766-
us = s.encode('utf-8', 'replace')
1767-
ius = unicode("%s%s" % (indent, us), 'utf-8', 'replace')
1766+
ius = "%s%s" % (indent, s if isinstance(s, unicode) else unicode(s, 'utf-8', 'replace'))
17681767
print >>stream, ius.encode('utf-8', 'replace')
17691768

17701769
for ch in root.children:

0 commit comments

Comments
 (0)