wistful / SublimeAutoPEP8

Automatically formats Python code to conform to the PEP 8 style guide using autopep8 and pep8 modules
144 stars 23 forks source link

Please add support for GBK in ST3 Package on Windows #68

Open 07freedom opened 3 years ago

07freedom commented 3 years ago

AutoPEP8 package for Sublime Text 3 got error:

UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 3168: illegal multibyte sequence

when it runs into Chinese characters. One way to solve it is to add "encoding=UTF-8” in https://github.com/wistful/SublimeAutoPEP8/blob/ea8bbdd811f7987cb8106aa099fa885df8a5a9b2/sublimeautopep8lib/autopep8.py#L3959

wistful commented 3 years ago

Thank you for the suggestion. Sounds like an interesting feature. The package is not actively maintained right now, and I can't promise I'll look into that. However, I'm open to PRs with new features and bug fixes. Contributions and help are very welcome.