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

When serializing, preserve Unicode information #575

Merged
merged 2 commits into from Jan 24, 2022

Conversation

ponponon
Copy link
Contributor

Hi, I'm here again, I resubmitted the pull request.


👇 Here is the original content:

I want to keep the original information of the Unicode code and not serialize it to ASCII

In [2]: json.dumps({"中文":"你好"})
Out[2]: '{"\\u4e2d\\u6587": "\\u4f60\\u597d"}'

In [3]: json.dumps({"中文":"你好"},ensure_ascii=False)
Out[3]: '{"中文": "你好"}'

@Delgan Delgan force-pushed the feature/support_unicode_char branch from 30a0582 to 400da3c Compare January 24, 2022 09:25
@Delgan Delgan merged commit b02ef7a into Delgan:master Jan 24, 2022
@Delgan
Copy link
Owner

Delgan commented Jan 24, 2022

All good, thanks for your time and sorry again for my mistake in #574. 🙏

I discussed using ensure_ascii=False in #339 (comment) but I hadn't taken the time to add it.

@ponponon
Copy link
Contributor Author

It's a pleasure, this is my first pull request for an open source project, feel loguru this great work, you are great open source author

@Delgan
Copy link
Owner

Delgan commented Jan 24, 2022

This is so kind of you, thanks! I hope this makes you willing to keep contributing to open source. 🚀

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.

None yet

2 participants