-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Cannot read Chinese characters with Json::CharReaderBuilder in Unicode character set #1134
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
Comments
No probleams in my env. In my env, when the console use other character set, it will be garbled.But when the console use UTF8, it will be OK. |
Yes,my MFC project is encoded as Unicode. So it cannot show Chinese correctly. |
@longlei , sorry for the belated reply.
Seems to be the only effective solution. I hava no idea. |
@longlei |
Closing due to inactivity. Feel free to reopen if this is still an issue. |
@longlei Not sure if you still care. I encountered the same thing with Japanese characters. And it turns out that @dota17 was right. Try following the link to check if your |
Thanks a lot. I have solved the problem with your help. |
You are right. Thanks. |
Describe the bug
Platform: Win10 x64, VS2019, jsoncpp-master
Language: MFC
There some Chinese characters in the "setting.json" which is encoded using UTF-8. And my MFC project is using Unicode character set, When I use the CharReaderBuilder.parseFromStream() to read the "setting.json", all of the Chinese characters becomes garbled and all English characters are right.
So how should I read the Chinese json file correctly?
The code:
The setting.json:
Any idea?
The text was updated successfully, but these errors were encountered: