From eadd90c22ede241cc2619e0d17341988b5ebf0f3 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 6 Apr 2019 14:20:02 +0100 Subject: [PATCH] ci: Use UTF-8 encoding for the test cover report Since we're embedding text coming from the tests into the report, we should specify an encoding for both the source JSON file and the target XML file when opening them. --- .gitlab-ci/meson-junit-report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/meson-junit-report.py b/.gitlab-ci/meson-junit-report.py index afc5d53c44..ea49282487 100755 --- a/.gitlab-ci/meson-junit-report.py +++ b/.gitlab-ci/meson-junit-report.py @@ -19,11 +19,11 @@ aparser.add_argument('--branch', metavar='NAME', default='master') aparser.add_argument('--output', metavar='FILE', help='The output file, stdout by default', - type=argparse.FileType('w'), + type=argparse.FileType('w', encoding='UTF-8'), default=sys.stdout) aparser.add_argument('infile', metavar='FILE', help='The input testlog.json, stdin by default', - type=argparse.FileType('r'), + type=argparse.FileType('r', encoding='UTF-8'), default=sys.stdin) args = aparser.parse_args()