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

utf-8 encoding for schema file #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GrixaYrev
Copy link

Explicitly specify encoding (utf-8) when open schema file.
It is need if non-ASCII strings in json schema file.

@michamos
Copy link
Contributor

@GrixaYrev thanks for your PR! Which OS and version of Python are you using? What does locale.getencoding() return? If no encoding is specified, it should fall back to a default encoding according to the docs, which is UTF-8 in many cases.

@GrixaYrev
Copy link
Author

@michamos, I use Windows, and locale.getencoding() return "cp1251" according to the docs:

On Windows, return the ANSI code page.

I think we can use utf-8 for converter unconditionally, because content is not printed to terminal.

Explicitly specify encoding (utf-8) when open schema file.

Signed-off-by: Grixa Yrev <[email protected]>
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