litgpt
litgpt copied to clipboard
Specify `UTF-8` encoding for every `open` function
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.
This is a good point. I learned this the hard way when teaching and there were students with various Windows operating systems.