[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2017-07-05 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2017-07-05 Thread Konstantin Zemlyak

Konstantin Zemlyak added the comment:

Terry J. Reedy wrote:

> Is this still relevant or should it be closed?

Should be closed.

> On Win10, I created a short script юникод.py using Save As from IDLE.
>
> py -2 юникод.py produces
> C:\Programs\Python27\python.exe: can't open file '??.py': [Errno 22] 
> Invalid argument
> If the patch fixes 2.7 and looks okay, maybe we should apply. If 'no' or 
> 'no', maybe we should forget 2.7 running files with such names.

This outcome is expected and error comes from python itself, not from launcher.

> On 3.5 and 3.6, the file runs without issue.  The issue was opened with 3.3; 
> 3.5 switched to a much more recent compiler, and I did not see any indication 
> in the messages that this was tested on 3.5 before it was added.  So perhaps 
> for 3.5+, this is out-of-date.

Launcher works fine now from my testing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2017-07-05 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Is this still relevant or should it be closed?

On Win10, I created a short script юникод.py using Save As from IDLE.

py -2 юникод.py produces
C:\Programs\Python27\python.exe: can't open file '??.py': [Errno 22] 
Invalid argument
If the patch fixes 2.7 and looks okay, maybe we should apply. If 'no' or 'no', 
maybe we should forget 2.7 running files with such names.

On 3.5 and 3.6, the file runs without issue.  The issue was opened with 3.3; 
3.5 switched to a much more recent compiler, and I did not see any indication 
in the messages that this was tested on 3.5 before it was added.  So perhaps 
for 3.5+, this is out-of-date.

--
nosy: +terry.reedy -BreamoreBoy
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2015-04-23 Thread Mark Lawrence

Mark Lawrence added the comment:

The bug reported in msg225529 has been fixed, but there's another one a few 
lines up https://hg.python.org/cpython/file/bd656916586f/PC/launcher.c#l265 as 
there's only one % but two parameters.  Although IIRC we'd get away with this 
the way C works, shouldn't we fix it anyway?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-08-19 Thread eryksun

eryksun added the comment:

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

--
nosy: +eryksun

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-08-18 Thread Steve Dower

Steve Dower added the comment:

It should be fixable. In general, Unicode in the console is fine, but the CRT 
doesn't handle it well (as shown by the _setmode extension being able to fix 
it).

The 'correct' fix for Unicode in the console is at 
http://www.siao2.com/2010/04/07/9989346.aspx and it basically comes down to 
use the Windows API and not the CRT. It's certainly fixable here, though the 
general fix for Python itself is more difficult because we want/need to expose 
the bytes interface as well (that said, #1602 seems to have a good fix right 
now that just happens to be easily distributable as pure Python code, so 
there's little motivation to merge it in, especially since it will break 
back-compat).

I don't know entirely whether _setmode is a correct fix here, or if the 
attached patch is sufficient, but it can be fixed.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-08-10 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this actually fixable?  I only ask as we seem to have a whole lot of fun 
with anything involving cmd.exe as epitomized on #1602.

--
nosy: +BreamoreBoy, steve.dower, vinay.sajip, zach.ware -brian.curtin
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2014-02-28 Thread Martin Dengler

Changes by Martin Dengler mar...@martindengler.com:


--
nosy: +mdengler

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20042] Python Launcher, Windows, fails on scripts w/ non-latin names

2013-12-27 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
title: Python Launcher for Windows fails to invoke scripts with non-latin names 
- Python Launcher, Windows, fails on scripts w/ non-latin names

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com