google/googletest

Generated XML test result files are not outputting UTF-8 encoded characters correctly using --gtest-output:xml

Aperta

#2932 aperta il 7 lug 2020

 (1 commento) (0 reazioni) (1 assegnatario)C++ (10.772 fork)batch import
help wanted

Metriche repository

Star
 (38.603 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

We have a .cpp google test file, with UTF-8 encoded characters in some of our test names, for example:

TEST(stringReplace, Can_find_matching_characters_differing_case_Àà)

When this is executed using the --gtest-output:xml flag, it is generating an .xml file which is declared as having UTF8 encoding (<?xml version=“1.0” encoding=“utf-8”?>), however those UTF8 characters are each being output as single byte ASCII characters.

This is causing issues when attempting to consume these files through an Azure Pipeline, using the PublishTestResults task.

Guida contributor