From: J <pro...@gm...> - 2018-06-12 14:51:10
|
Hi, I am having a problem writing a json stream as UTF8 on Windows. The file I am reading is encoded as UTF8, reading the file works as expected: By reading a tag as a string and passing it to MultiByteToWideChar, I am able to reconstitute the correct Unicode output. However, if I take the stream (which is already in UTF8) and simply try to write it back out, it results in an ASCII or ANSI (not sure) encoded file that contains lots of string entries with things like \u00f1 in them. The following is an abrdged example. Json::StreamWriterBuilder Writer; stream.write( root.toStyledString().c_str(), root.toStyledString().size() ); Any help is appreciated. Thank you |