Boost C++ Libraries: Ticket #10815: Boost 1.55 property_tree INFO parser does not round-trip for \t (tab) https://svn.boost.org/trac10/ticket/10815 <p> Following GTest fails, as embedded tab (\t) has been expanded to a 'real tab' by write_info (note that \n, \0, \r are all escaped properly </p> <pre class="wiki"> TEST(AdHocTest, AHT0051Boost__property_tree__info_parser_tab) { std::stringstream ss; std::string inputRaw, input, output, exp, act; boost::property_tree::ptree ptree; inputRaw = "key2 \"value with special characters in it {}; #\\n\\t\\\"\\r\"\n"; ss.str(inputRaw); ASSERT_NO_THROW(boost::property_tree::info_parser::read_info(ss, ptree)) &lt;&lt; "parse inputRaw"; EXPECT_EQ(std::string("value with special characters in it {}; #\n\t\"\r"), ptree.get&lt;std::string&gt;("key2")); ss = std::stringstream(); ASSERT_NO_THROW(boost::property_tree::info_parser::write_info(ss, ptree)) &lt;&lt; "extract input"; input = ss.str(); exp = "key2 \"value with special characters in it {}; #\\n\\t\\\"\\r\"\n"; act = input; EXPECT_EQ(exp.size(), act.size()); EXPECT_EQ(exp, act); for (size_t ix = 0, diffs = 0; (ix &lt; exp.size()) &amp;&amp; (ix &lt; act.size()) &amp;&amp; (diffs &lt; 5); ++ix) { if (exp[ix] != act[ix]) { ++diffs; } EXPECT_EQ(exp[ix], act[ix]) &lt;&lt; "ix=" &lt;&lt; ix; } } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10815 Trac 1.4.3 viboes Fri, 13 Feb 2015 18:31:10 GMT component changed; owner set https://svn.boost.org/trac10/ticket/10815#comment:1 https://svn.boost.org/trac10/ticket/10815#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Sebastian Redl</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">property_tree</span> </li> </ul> Ticket