From 3e8fdc6e36b0020386902a98e6999e087d737648 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 28 Dec 2021 15:48:18 +0100 Subject: [PATCH] Resilience to non-UTF8 characters ... use the method `backslashreplace` to deal with non-UTF8 characters. See https://docs.python.org/3/library/codecs.html#error-handlers --- Testsuite/test/parse-ctest-dashboard-xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index dc8524075ae..0df042fa1d5 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -56,7 +56,7 @@ for t in testing.findall('Test'): if 'encoding' in t_output.attrib and t_output.attrib['encoding'] == 'base64': t_output_value = base64.standard_b64decode(t_output_value) if 'compression' in t_output.attrib and t_output.attrib['compression'] == 'gzip': - t_output_value = zlib.decompress(t_output_value).decode("utf-8") + t_output_value = zlib.decompress(t_output_value).decode("utf-8", 'backslashreplace') tests[tests_ids[t.find('FullName').text]] = \ { \ "Name": t.find('Name').text, \