You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stephane Bailliez <sb...@imediation.com> on 2001/07/12 14:58:54 UTC

[PATCH] JUnit XML encoding

JUnit messages (and stacktrace) are written in local VM encoding while the
default XML encoding is UTF8, thus parsing these files will always fail.
(the problem was similar in XmlLogger)

XMLJUnitResultFormatter::endTestSuite(...)
- wri = new OutputStreamWriter(out);
+ wri = new OutputStreamWriter(out, "UTF8");

XMLResultAggregator::writeDOMTree(...)
- PrintWriter wri = new PrintWriter(out);
+ import java.io.OutputStreamWriter;
+ OutputStreamWriter wri = new OutputStreamWriter(out, "UTF8");

-- 
 Stéphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 


Re: [PATCH] JUnit XML encoding

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 12 Jul 2001, Stephane Bailliez <sb...@imediation.com>
wrote:

> XMLResultAggregator::writeDOMTree(...)
> - PrintWriter wri = new PrintWriter(out);
> + import java.io.OutputStreamWriter;
> + OutputStreamWriter wri = new OutputStreamWriter(out, "UTF8");

not quite (because of the wri.checkError call further down) -
committed a slightly modified version.

Stefan