mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Merge pull request #767 from hmich/xml-encoder-extended-ascii
Do not encode extended ASCII characters in XML reporter
This commit is contained in:
commit
5b00fd40ba
@ -57,7 +57,7 @@ namespace Catch {
|
|||||||
default:
|
default:
|
||||||
// Escape control chars - based on contribution by @espenalb in PR #465 and
|
// Escape control chars - based on contribution by @espenalb in PR #465 and
|
||||||
// by @mrpi PR #588
|
// by @mrpi PR #588
|
||||||
if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' )
|
if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' )
|
||||||
os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>( c ) << ';';
|
os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast<int>( c ) << ';';
|
||||||
else
|
else
|
||||||
os << c;
|
os << c;
|
||||||
|
Loading…
Reference in New Issue
Block a user