Hi Dmitry,
Thanks for review and comment.
On 2019/4/30 下午2:05, Dmitry Timoshkov wrote:
Please add the convincing set of the tests first to show the problem, at the moment I fail to see what exactly you are trying trying to fix, and only then try to think about the possible ways to fix the spotted bug(s).
I think the tests already exposed some problems, some applications were trying to use GetPrivateProfileStringA() for getting values from an UTF-8 profile.
Attachment is an independent testcase. On Windows, printing out result isn't locale related(I tested it on English and Chinese Windows). But on current Wine, the result is locale related. For example: $ LC_ALL=zh_CN.UTF-8 LANG=zh_CN.UTF-8 wine test_GetPrivateProfileStringA.exe will print out:
ffffffe4 ffffffb8 003f
when on Wine with en_US.UTF-8 and on Windows it was:
ffffffe4 ffffffb8 ffffff8a 003a
I'm quite not sure how to fix it correctly, any thoughts or suggest will be appreciated.