Modify XML encoder to hex-encode invalid UTF-8 sequences

There are still some holes, e.g. we leave surrogate pairs be
even though they are not a part of valid UTF-8, but this might
be for the better -- WTF-8 does support surrogate pairs inside
text.

Closes #1207
This commit is contained in:
Martin Hořeňovský
2018-03-25 20:44:30 +02:00
parent e11508b48a
commit 3b801c4fda
8 changed files with 923 additions and 39 deletions

View File

@@ -1084,6 +1084,6 @@ due to unexpected exception with message:
Why would you throw a std::string?
===============================================================================
test cases: 202 | 149 passed | 49 failed | 4 failed as expected
assertions: 1015 | 887 passed | 107 failed | 21 failed as expected
test cases: 203 | 150 passed | 49 failed | 4 failed as expected
assertions: 1057 | 929 passed | 107 failed | 21 failed as expected