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

Specify UTF-8 encoding in Python script #808

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Conversation

Eiim
Copy link
Collaborator

@Eiim Eiim commented Sep 26, 2024

Python seems to assume CP-1252 or something similar on Windows, which breaks on emoji. This ensures that UTF-8 will be used.

Works just as well, no need for an extra import
update_readme.py Outdated
@@ -122,7 +122,7 @@
print(f"README.md updated with {len(svg_list)} icons.")

# Replace the tables in the REFERENCE document
with open('REFERENCE.md','r+') as f:
with open('README.md','r+', encoding="utf-8") as f:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be REFERENCE.

update_readme.py Outdated
@@ -135,7 +135,7 @@
print(f"REFERENCE.md updated.")

# Replace the table in the CHECK document
with open('CHECK.html','r+') as f:
with open('README.md','r+', encoding="utf-8") as f:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be CHECK

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, wonder how those happened. Thanks for the catch.

@edent edent merged commit 9b5b4df into edent:master Sep 30, 2024
1 check passed
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