Skip to content

Fix encoding issue for Windows OS User especially for non-English user #1314

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

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

JunDamin
Copy link
Contributor

I am a windows os user in South Korea.
When I try to develop a small niche package using nbdev I faced an encoding problem.

As you may know, the default encoding for Korean in Windows OS is cp949. Therefore, when nbdev using Path.read_text from pathlib, their default encoding is cp949 and it causes a decoding error.

The simplest solution that I can figure out is explicitly set encoding for Path.read_text as 'utf-8'.

I believe it will not cause any change for most of users, at the same time it prevent not only Korean but also Japanese or other language users on Windows OS from encoding issues.

I hope this can help more Korean users enhance their productivity by nbdev.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jph00 jph00 merged commit 4820717 into AnswerDotAI:master Oct 19, 2023
@jph00
Copy link
Contributor

jph00 commented Oct 19, 2023

Thank you!

@jph00 jph00 added the bug Something isn't working label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants