Jactry Zeng jzeng@codeweavers.com wrote:
This series is trying to fix GetPrivateProfileStringA() to let it can deal with section\key\value with multibyte characters. The related real application is DISTRAINT: Deluxe Edition[1]. It saved localization information in some .ini files and used GetPrivateProfileStringA() for accessing them. The problem is MultiByteToWideChar(CP_ACP) in PROFILE_Load() will return decomposed string with '0x003f' for some multibyte characters when LC_CTYPE is zh_CN.UTF-8 or ja_JP.UTF-8. Then PROFILE_Load() will cache an wrong string and return a wrong result for GetPrivateProfileStringA().
But I'm not very sure if this is a good way to fix this issue since it hard coding codepage to 1252 for MultiByteToWideChar()/WideCharToMultiByte().
That is certainly wrong. Very first thing to do (as usual) is to add a test case demonstarting the issue.