Author loewis
Recipients amaury.forgeotdarc, eric.araujo, loewis, runtux, tarek, techtonik, vstinner
Date 2011-10-14.16:30:22
SpamBayes Score 3.99649e-09
Marked as misclassified No
Message-id <1318609823.9.0.1814972478.issue10945@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-10-14 16:30:23loewissetrecipients: + loewis, amaury.forgeotdarc, vstinner, techtonik, tarek, eric.araujo, runtux
2011-10-14 16:30:23loewissetmessageid: <1318609823.9.0.1814972478.issue10945@psf.upfronthosting.co.za>
2011-10-14 16:30:23loewislinkissue10945 messages
2011-10-14 16:30:22loewiscreate