-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOError: [Errno 22] when running files with non-ascii characters. #206
Comments
Recent fixes to encoding issues and argument quoting might have fixed this. |
I can still reproduce this. |
I'll start to take a look at this. |
I investigated it a bit more and it seems that Python 2.7 itself is broken in this regard. Further info: In Python 2.7 it's not even possible to use
Code:
This happens because the APIs used in Python 2.7 aren't unicode-compatible. There are workarounds such as using So, it's not possible to launch unicode that's not compatible with the current machine in Python 2.7 out of the box. Now, what should be possible is to launch unicode chars that are compatible with the current machine. So, for instance, having unicode chars as: So, I'm working on fixing this use case (but not the use case for any unicode chars). |
Yep, that's the expectation in general for anything Win32 and Python 2.7 related that deals with filenames or the console; best case, with everything set up correctly, it should support whatever the "non-Unicode language" is in Windows settings. I'm not entirely sure, though, but it might actually be possible to get full Unicode support in 2.7 by setting the locale to UTF-8, since it's an option in Win10 - and maybe even prior to that, via |
As a note, I've been able to make the debugger work, but making the test for it is taking a bit longer than I thought. |
Environment data
Additional info:
File System encoding:
mbcs
Default encoding:
ascii
Actual behavior
This error is shown:
Expected behavior
Should launch the file, like in pyhton 3.*
Steps to reproduce:
C:\测试\experiment.py
The text was updated successfully, but these errors were encountered: