Boost C++ Libraries: Ticket #7519: newlines and tabs are not encoded when writing XML. https://svn.boost.org/trac10/ticket/7519 <p> This XML file : </p> <pre class="wiki">&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;somemoredata&gt;hello&amp;#9;world:&amp;#10;Want something?&lt;/somemoredata&gt; </pre><p> Is properly parsed and somedata contains "hello\tworld\nWant something?", but this information is lost when writing: </p> <pre class="wiki">&lt;somemoredata&gt;Hello world Want something?&lt;/somemoredata&gt; </pre><p> Reading that file will yield "Hello world Want something?", so the round trip ate these characters. Instead, write_xml should encode newlines and tabs according to <a class="ext-link" href="http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping"><span class="icon">​</span>http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping</a>. </p> <p> Boost.Graph's write_graphml() and read_graphml() are also affected by this problem as they reuse property_tree. The attached patch fix the problem for both libraries. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7519 Trac 1.4.3 nicolas.cavallari@… Wed, 17 Oct 2012 14:21:38 GMT attachment set https://svn.boost.org/trac10/ticket/7519 https://svn.boost.org/trac10/ticket/7519 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost.patch</span> </li> </ul> <p> encode \n and \t when writing XML. </p> Ticket Sebastian Redl Mon, 24 Feb 2014 12:56:29 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7519#comment:1 https://svn.boost.org/trac10/ticket/7519#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed on develop in 4e7aa973f. </p> <p> Merged to master in 85f8d8866ccf. </p> Ticket Pieter Sun, 10 Aug 2014 17:55:19 GMT <link>https://svn.boost.org/trac10/ticket/7519#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7519#comment:2</guid> <description> <p> This patch broke my existing code. See: <a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/10338"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/10338</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>