From: Dmitry Timoshkov Subject: Re: [RFC PATCH 1/2] kernel32: Move implementation of {Get,Write}PrivateProfileStringW() to helper. Message-Id: <20190423181708.95df8a58450d373ac0efd635@baikal.ru> Date: Tue, 23 Apr 2019 18:17:08 +0800 In-Reply-To: References: <56673c60-2846-8403-3158-9d51832bff1b@codeweavers.com> <20190423163305.058d97e3a45c92952687f7a7@baikal.ru> <20190423171022.429726f4f33ea079821d6c7a@baikal.ru> Jactry Zeng wrote: > > + lstrcpyA(expected_val, "\xe9\x85\x92\x2e"); > > + len = MultiByteToWideChar(CP_ACP, 0, expected_val, -1, expected_valW, MAX_PATH) - 1; > > > > You should not rely on CP_ACP being compatible with the multibyte string. > This just want to get an expected result which corresponding to native GetPrivateProfileStringW()'s. This can't work reliably, the test should be made to return reasonable results under different locales. -- Dmitry.