Message145548
The problem is that the config file is parsed using GetPrivateProfileString, and the result is then passed to TextOut, SetDlgItemText, CreateWindow, etc. all of which are defined to accept MBCS strings. I agree that this can't work correctly in the general case.
Changing the GUI functions to operate on Unicode strings is certainly feasible and a good idea. The main challenge then is the format of the INI file. IIUC, GetPrivateProfileStringW is willing to process UTF-16 (with BOM) encoded INI files, but I never tested whether it actually does. If it does, I recommend to have the INI file encoded in UTF-16 (with BOM, using LE for safety).
In porting wininst.exe, it seems tempting to use the TEXT family of APIs. I'd advise against that, and recommend to explicitly use the *W functions. |
|
Date |
User |
Action |
Args |
2011-10-14 16:30:23 | loewis | set | recipients:
+ loewis, amaury.forgeotdarc, vstinner, techtonik, tarek, eric.araujo, runtux |
2011-10-14 16:30:23 | loewis | set | messageid: <1318609823.9.0.1814972478.issue10945@psf.upfronthosting.co.za> |
2011-10-14 16:30:23 | loewis | link | issue10945 messages |
2011-10-14 16:30:22 | loewis | create | |
|