Hnfull / Intensio-Obfuscator

Obfuscate a python code 2.x and 3.x
MIT License
624 stars 129 forks source link

UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 688 #47

Closed gaopeng-victor closed 3 years ago

gaopeng-victor commented 4 years ago

How to set the encoding ? My src file is UTF8, but it seems Intensio-Obfuscator process it as a GBK file...

====================== the following is the error msg ================== File "intensio_obfuscator.py", line 339, in main() File "intensio_obfuscator.py", line 133, in main verboseArg=args.GetArgsValue().verbose File "D:\Dev\Intensio-Obfuscator-master\intensio\core\obfuscation\intensio_delete.py", line 106, in Comments for eachLine in inputFile: File "D:\Python3\lib\fileinput.py", line 252, in next line = self._readline() File "D:\Python3\lib\fileinput.py", line 366, in _readline return self._readline() UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 688: illegal multibyte sequence

Hnfull commented 4 years ago

hi, see (https://github.com/Hnfull/Intensio-Obfuscator/issues/36) this can resolve your problem

gaopeng-victor commented 4 years ago

hi, see (#36) this can resolve your problem Thanks, I've tried (#36), it works but the output file is not obfuscated, anyway, this problem is sovled when I change to CentOS. But there's a new encoding problem about chinese word when use '-rth' param, I'll describe it in a new issue.

Hnfull commented 4 years ago

hi, I will try to find a solution to force reading in utf-8.

Hnfull commented 3 years ago

feature abandoned (project not maintained anymore)