This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kcwu
Recipients amaury.forgeotdarc, andersjm, brotch, gregcouch, kcwu, mclausch, ocean-city, xianyiteng
Date 2009-05-12.03:33:20
SpamBayes Score 8.221235e-06
Marked as misclassified No
Message-id <1242099202.46.0.120852396783.issue1759845@psf.upfronthosting.co.za>
In-reply-to
Content
There is slight difference between C and python patch.
C version: convert mbcs argument to unicode
py version: convert unicode argument to mbcs

Actually, python version patch may not work if the string is unicode and
cannot encoded by mbcs. For example, my windows system is Chinese
(cp950) and the program I want to execute contains Japanese characters.
Encode Japanese characters with mbcs (in this case, it is cp950) will
fail. This is also what Matt (mclausch) said.

On the other hand, the C version patch. I don't think fall-back is
necessary. If the string is failed to convert from mbcs to unicode, it
will be eventually failed inside CreateProcessA() because CreateProcessA
internally (after win2k) will try to convert from mbcs to unicode and
call CreateProcessW.
History
Date User Action Args
2009-05-12 03:33:22kcwusetrecipients: + kcwu, amaury.forgeotdarc, gregcouch, andersjm, ocean-city, mclausch, brotch, xianyiteng
2009-05-12 03:33:22kcwusetmessageid: <1242099202.46.0.120852396783.issue1759845@psf.upfronthosting.co.za>
2009-05-12 03:33:21kcwulinkissue1759845 messages
2009-05-12 03:33:20kcwucreate