Subject: [Boost-bugs] [Boost C++ Libraries] #13143: boost read_json throw exception when the json file has some gbk chinese charactor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-08-01 02:47:29
#13143: boost read_json throw exception when the json file has some gbk chinese
charactor
-------------------------------+----------------------------
Reporter: Li Da <sculida@â¦> | Owner: Sebastian Redl
Type: Bugs | Status: new
Milestone: To Be Determined | Component: property_tree
Version: Boost 1.64.0 | Severity: Problem
Keywords: |
-------------------------------+----------------------------
there is a json file like this, without bom, use gbk code set. The
boost::property_tree can parse it successfully in the majority.
{{{
try {
boost::property_tree::read_json(filename, tree);
}
catch (exception &e) {
cerr << e.what() << endl;
}
}}}
However, if the file has chinese character"å"(c0fa)or"ç¹"(c040), the
property_tree will throw exception"invalid code sequence"
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13143> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-08-01 02:50:17 UTC