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 eryksun
Recipients BreamoreBoy, eryksun, ezio.melotti, loewis, mdengler, steve.dower, tim.golden, vinay.sajip, vstinner, zach.ware, zart
Date 2014-08-19.11:12:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408446744.8.0.806118799848.issue20042@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is skip_whitespace mistakenly calls isspace instead of iswspace. 

http://hg.python.org/cpython/file/c0e311e010fc/PC/launcher.c#l48

isspace has undefined behavior when the argument is "not EOF or in the range of 0 through 0xFF":

http://msdn.microsoft.com/en-us/library/y13z34da%28v=vs.100%29.aspx

The display of debug messages should be handled in its own issue. IMO, setting stderr to _O_WTEXT mode or _O_U16TEXT mode looks reasonable. The launcher already uses wide-character strings and the wprintf family. It's just the default _O_TEXT mode ends up encoding to the console codepage. 

Regarding msg206744, %s in wide-character format strings is OK for VC++ 10:

http://msdn.microsoft.com/en-us/library/hf4y5e3w%28v=vs.100%29.aspx

This will be a legacy mode in VC++ 14 (CPython 3.5?): 

http://blogs.msdn.com/b/vcblog/archive/2014/06/18/crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1.aspx

P.S.
In case someone wants an easy issue, I noticed a bug. There should only be one %s in the format string that starts on line 262:

http://hg.python.org/cpython/file/c0e311e010fc/PC/launcher.c#l262
History
Date User Action Args
2014-08-19 11:12:25eryksunsetrecipients: + eryksun, loewis, vinay.sajip, vstinner, tim.golden, ezio.melotti, zart, BreamoreBoy, zach.ware, mdengler, steve.dower
2014-08-19 11:12:24eryksunsetmessageid: <1408446744.8.0.806118799848.issue20042@psf.upfronthosting.co.za>
2014-08-19 11:12:24eryksunlinkissue20042 messages
2014-08-19 11:12:23eryksuncreate