Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError charmap (On Windows) #135

Open
yarbs opened this issue Nov 8, 2023 · 1 comment
Open

UnicodeDecodeError charmap (On Windows) #135

yarbs opened this issue Nov 8, 2023 · 1 comment

Comments

@yarbs
Copy link

yarbs commented Nov 8, 2023

lineno 97-99 for https://github.com/dadadel/pyment/blob/master/pyment/pyment.py
encoding is not defined when opening the file, default encoding on windows is cp1252 and fails when a unicode character is encountered.

Suggest adding an argument to argparse and add a parameter to init of PyComment.

@J-K-M
Copy link

J-K-M commented Dec 9, 2023

If using the -w flag then this issue also arrises on write - line 325.
This could likely be fixed in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants