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

Explicitly define encoding as utf-8 #117

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

ehcloninger
Copy link
Contributor

Working toward solving #115

On Windows 11, using Powershell, VS Code, and Python 3.11.5. Ran into exceptions into setup.py while playing around. On windows, open() defaults to cp1252 instead of utf-8. :-( Just starting with the project and this was the first thing I encountered. I suspect @thisisparker uses Mac or Linux.

@ehcloninger
Copy link
Contributor Author

If I misunderstand this, feel free to reject. I'm a C/C++ dev and more than a bit rusty.

@thisisparker
Copy link
Owner

Guilty as charged! I guess open() uses whatever locale.getencoding() returns. Oddly we do use roughly 1252 throughout a lot of the project because of .puz limitations, but you're right it should be utf-8 here. Thanks for the PR!

@thisisparker thisisparker merged commit 734c1ea into thisisparker:main Aug 26, 2023
@ehcloninger
Copy link
Contributor Author

Guilty as charged! I guess open() uses whatever locale.getencoding() returns. Oddly we do use roughly 1252 throughout a lot of the project because of .puz limitations, but you're right it should be utf-8 here. Thanks for the PR!

No worries. I'm platform agnostic. I use Windows, Mac, and Linux. Whatever works best. I blew the dust off my 2014 Macbook to maybe make it easier.

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

Successfully merging this pull request may close these issues.

2 participants