From: Jactry Zeng Subject: Re: [RFC PATCH 1/2] kernel32: Move implementation of {Get,Write}PrivateProfileStringW() to helper. Message-Id: Date: Tue, 23 Apr 2019 18:04:02 +0800 In-Reply-To: <20190423171022.429726f4f33ea079821d6c7a@baikal.ru> References: <56673c60-2846-8403-3158-9d51832bff1b@codeweavers.com> <20190423163305.058d97e3a45c92952687f7a7@baikal.ru> <20190423171022.429726f4f33ea079821d6c7a@baikal.ru> On 2019/4/23 下午5:10, Dmitry Timoshkov 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. > + ret = GetPrivateProfileStringW(section_schineseW, name5W, NULL, > + bufW, MAX_PATH, filenameW); > + ok(ret == len || > + (ret == 0 && bufW[0] == '\0') /* non-English */, "Expected %d, got %d\n", len, ret); > > A test that sometimes fails is broken. OK, will improve this. Thanks.