Commit aa3ef75491b2ea0a1162230e352c6bbeeb3ab74d
Committed by
GitHub
Merge pull request #320 from mhwong2007/patch-1
Fix NameError: unichr not defined in python3
Showing
1 changed file
with
1 additions
and
1 deletions
oletools/olevba3.py
| ... | ... | @@ -909,7 +909,7 @@ def vba_chr_tostr(t): |
| 909 | 909 | if i>=0 and i<=255: |
| 910 | 910 | return VbaExpressionString(chr(i)) |
| 911 | 911 | else: |
| 912 | - return VbaExpressionString(unichr(i).encode('utf-8', 'backslashreplace')) | |
| 912 | + return VbaExpressionString(chr(i).encode('utf-8', 'backslashreplace')) | |
| 913 | 913 | except ValueError: |
| 914 | 914 | log.exception('ERROR: incorrect parameter value for chr(): %r' % i) |
| 915 | 915 | return VbaExpressionString('Chr(%r)' % i) | ... | ... |