pycdc
pycdc copied to clipboard
Not supported non ascii character?
If the .py file has some non ascii characters, the pycdc can not decompile successfully.
Windows 10 python 3.10.11
Code(just for example):
# hello.py. This line not included in hello.py
import os
try:
print('Hello World!')
except:
pass
print('任务结束!')
os.system('pause')
Run:
$ python -m py_compile hello.py
$ cd __pycache__
$ pycdc.exe hello.cpython-310.pyc
Result:
# Source Generated with Decompyle++
# File: hello.cpython-310.pyc (Python 3.10)
Warning: block stack is not empty!
import os
try:
print('Hello World!')
finally:
pass
print('浠诲姟缁撴潫锛?
Am I the only one experiencing this issue?
Yes, u r the only one.
@suifengpiaoyang in Python 3.12 there is another issue on your sample above: but сhinese characters are just great
# File: china1.cpython-312.pyc (Python 3.12)
import os
print('Hello World!')
print('任务结束!')
os.system('pause')
return None
continue