https://bugs.winehq.org/show_bug.cgi?id=51220
Bug ID: 51220 Summary: version:info - The GetFileVersionInfoEx() checks fail in non-English locales Product: Wine Version: 6.8 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: version Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
The GetFileVersionInfoEx() checks fail in non-English locales because the returned information seems to be localized even when they shouldn't be, i.e. for flags=0 and flags=FILE_VER_GET_NEUTRAL:
https://test.winehq.org/data/patterns.html#version:info
fr_FR: info.c:709: Test failed: [0] got 1036, expected lang is 1033 ja_JP: info.c:709: Test failed: [0] got 1041, expected lang is 1033
I suspect this is because this code block in GetFileVersionInfoSizeExW() systematically fails to find the English resource:
LANGID english = MAKELANGID( LANG_ENGLISH, SUBLANG_DEFAULT ); hRsrc = FindResourceExW( hModule, MAKEINTRESOURCEW(VS_VERSION_INFO), (LPWSTR)VS_FILE_INFO, english );
I tried some alternative combinations for MAKELANGID() (though maybe not the right one) to no avail. So it's unclear to me if the issue is a bug in FindResourceExW() or an issue in the set up of the file version information in kernel32.dll.
Note: * The fg-deb64-* tests are run in the fr_FR.UTF-8 locale.