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 for every open function #1283

Merged
merged 3 commits into from
Apr 15, 2024

Conversation

Andrei-Aksionov
Copy link
Collaborator

Hi there 👋

One might ask why do we need to specify encoding explicitly, when it should be by default utf-8.
Well, not quite.

The default encoding is platform dependent (whatever locale.getpreferredencoding() returns)

Which means that on Windows we can have an error, and that is exactly what recently happened.

@rasbt
Copy link
Collaborator

rasbt commented Apr 13, 2024

This is a good point. I learned this the hard way when teaching and there were students with various Windows operating systems.

This was referenced Apr 15, 2024
@carmocca carmocca merged commit 410a712 into Lightning-AI:main Apr 15, 2024
9 checks passed
@Andrei-Aksionov Andrei-Aksionov deleted the open_utf8_encoding branch April 16, 2024 09:53
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.

4 participants