https://bugs.winehq.org/show_bug.cgi?id=55019
--- Comment #2 from François Gouget fgouget@codeweavers.com --- The GitLab CI VMs use the default English locales so the codepage is 1252:
SystemDefaultLCID 0409 UserDefaultLCID 0409 ThreadLocale 0409 SystemPreferredUILanguages 0409 UserDefaultUILanguage 0409 ThreadUILanguage 0409 KeyboardLayout 04090409 Country 244 ACP 1252
I think the test should take into the case where an environment variable contains a badly encoded string and adjust its expectations accordingly.
This is even something that it should test by itself. After all we know this is something that can happen in the wild, to all the Windows GitLab CI users for instance. Testing this explicitly will also automatically produce results in all the locales tested by the Testbot, including ones with a UTF-8 code page.