Search code examples
c++mfcatlinibstr

Language for non-unicode programs change ini reading


I've a non-unicode application which is using unicode versions of the ini reading functions like GetPrivateProfileSectionW and GetPrivateProfileStringW. The program is working well when "Language for non-unicode programs" is set to English.

When I change this setting to Chinese (PRC), the functions GetPrivateProfileSectionW and GetPrivateProfileStringW return null.

I must keep this setting at Chinese, because when English is selected for "Language for non-unicode programs", CComBSTR.LoadString is not working as expected, it loads the Chinese characters in a resource DLL as question marks.

Any ideas?

Thanks.


Solution

  • Michael Kaplan explains. The solution is to use Unicode INI files, which don't depend on the "Language for non-unicode programs".