Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41924a6

Browse files
committed
fix for a bug reported by [email protected]​.ar (UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 0: ordinal
not in range(128))
1 parent 1d61611 commit 41924a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extra/safe2bin/safe2bin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def safechardecode(value):
6060
while True:
6161
match = regex.search(retVal)
6262
if match:
63-
retVal = retVal.replace(match.group("result"), binascii.unhexlify(match.group("result").lstrip('\\x')))
63+
retVal = retVal.replace(match.group("result"), unichr(ord(binascii.unhexlify(match.group("result").lstrip('\\x')))))
6464
else:
6565
break
6666

0 commit comments

Comments
 (0)