Open pigLoveRabbit520 opened 5 months ago
I cannot reproduce this.
On Linux I also got the right answer. but I am using Windows and visual studio. On windows I got the wrong answer.
Can you show the output of data.dump(-1, ' ', true)
? This should show \u7ec4
, but I want to be sure.
@pigLoveRabbit520 Confirmed its an issue of your Console codepage. You are using cp936(Simplified Chinese). It prints 组 as 缁. chcp 65001(UTF8) should print 组 as 组. So its not the issue of nlomann json.
@syoyo I have changed the codepage to 65001, however, I got the wrong result
Please check my previous comment and post the output of dump
(And since I'm neither familiar with Chinese nor Windows - could there be an issue with the font?)
Description
unicode string "\u7ec4" should get "组" but got "缁"
Reproduction steps
copy latest
json.hpp
to vs C++ project and write the code below.Expected vs. actual results
should get![image](https://github.com/nlohmann/json/assets/16663435/dac292bb-ec2d-4988-8b2a-8f5d7c8c8b67)
组
but got缁
Minimal code example
json data
Compiler and operating system
vs 2022 and windows 11
Library version
version 3.11.3
Validation
develop
branch is used.