Martin v. Löwis <mar...@v.loewis.de> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10945>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to