Re: [Boost-bugs] [Boost C++ Libraries] #13402: Log format JUNIT generates invalid XML files with incorrect encoding

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13402: Log format JUNIT generates invalid XML files with incorrect encoding
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-04-07 07:27:20


#13402: Log format JUNIT generates invalid XML files with incorrect encoding
-------------------------------+-------------------------------
  Reporter: gallien@… | Owner: Gennadiy Rozental
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: test
   Version: Boost 1.66.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-------------------------------

Comment (by sebastian.freitag@…):

 Your first question: I need to escape, because my source code file is
 utf-8, but I want to test the string in the variable oelniveau, and THIS
 string is supposed to be single byte windows-1252 encoded "Ölniveau". If I
 transform it, like you suggest, my test will always fail.

 Regarding your second question: I compile and run tests on a few different
 VMs. I checked the locale and on the Linux machine it's identical to the
 one you suggested.

 I realize how difficult it is to guarantee that everything printed to the
 junit XML is valid utf-8. My hack now is to just replace the first line in
 the XML before processing it further and rather live with a few mangled
 garbage utf-8 characters than having to deal with exceptions from the Java
 program parsing the XML. Would it hurt to do so in general and set
 encoding="windows-1252" by default? We are speaking about output from
 failed tests in the end. So I guess in any case you would rather want to
 have any info over crashing your post processor.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13402#comment:12>
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 : 2018-04-07 07:33:23 UTC