id summary reporter owner description type status milestone component version severity resolution keywords cc 4340 property_tree xml parser failed to handle wstream with i18n char zhuo.qiang@… Sebastian Redl "boost::property_tree::read_xml(wistream&, wptree&) throw exception if tag/value/attribute has a unicode with '\0' inside, for example, for chinese character L'\u4E00', an exception will be throwed because the parser treat L'\u4E00' as '\0'. for example, the following test case won't pass: BOOST_AUTO_TEST_CASE(test_i18n_xml_tag_name) { wistringstream in(L""<\u4E00>abc""); property_tree::wptree pt; BOOST_REQUIRE_NO_THROW(property_tree::read_xml(in, pt)); BOOST_CHECK(L""abc"" == pt.get(L""\u4E00"")); } BOOST_AUTO_TEST_CASE(test_i18n_xml_attribute_name) { wistringstream in(L""def""); property_tree::wptree pt; BOOST_REQUIRE_NO_THROW(property_tree::read_xml(in, pt)); BOOST_CHECK(L""abc"" == pt.get(L""tag..\u4E00"")); } BOOST_AUTO_TEST_CASE(test_i18n_xml_attribute_value) { wistringstream in(L""def""); property_tree::wptree pt; BOOST_REQUIRE_NO_THROW(property_tree::read_xml(in, pt)); BOOST_CHECK(L""\u4E00"" == pt.get(L""tag..attribute"")); } BOOST_AUTO_TEST_CASE(test_i18n_xml_tag_value) { wistringstream in(L""\u4E00""); property_tree::wptree pt; BOOST_REQUIRE_NO_THROW(property_tree::read_xml(in, pt)); BOOST_CHECK(L""\u4E00"" == pt.get(L""tag"")); } The fix is treat the all char whose value above 255 same as 'z' when doing semantic action. " Patches closed Boost 1.45.0 property_tree Boost 1.44.0 Showstopper fixed property_tree i18n unicode