Skip to content

if json file contain Internationalization chars , get exception #1122

@tan00

Description

@tan00
	json j;
	j["name"] = "中文";

	std::cout << j.dump() << std::endl;
	std::ofstream ofs;
	ofs.open("test.json");
	ofs << j;
	ofs.close();

	std::ifstream ifs("test.json");
	if (!ifs.is_open())
	{
		std::cout << "open error" << std::endl;
		return -1;
	}
	json j2;
	j2 << ifs;
	std::cout << j2.dump() << std::endl;

exception at j2 << ifs;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions