savoirfairelinux / flake8-copyright

Adds copyright checks to flake8
GNU Lesser General Public License v3.0
15 stars 15 forks source link

UnicodeDecodeError error on Windows when dealing with UTF-8 characters #15

Open acabarbaye opened 4 years ago

acabarbaye commented 4 years ago

When running flake8-copyright on Windows on files which contain unicode characters, I get the following error: File "..\lib\site-packages\flake8_copyright.py", line 86, in run top_of_file = open(self.filename).read(toread) File "..\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 5141: character maps to <undefined> @maximest-pierre

maximest-pierre commented 4 years ago

I don't work here anymore but @pierreduchemin should be your best bet for getting this issue or PR looked at.

jieru-hu commented 3 years ago

@pierreduchemin would it be possible to have this fixed soon? Thanks!