-
-
Notifications
You must be signed in to change notification settings - Fork 255
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 0] Error on Windows #101
Comments
I think I figured this out. I'm using powershell on windows 10 and can consistently reproduce this when I'm running a long process and scroll up (and my guess is introducing an unexpected character). When I let go, it crashes.
|
These weird errors are a known issue in Python 2 on Windows with CP65001, see e.g. here: https://bugs.python.org/issue1602#msg148990 :
To summarise the little I understand of it, codepage 65001 in Windows is basically broken in many subtle ways and there is no proper UTF-8 support on the Windows console. The real solution is to use Windows's UTF-16 system API calls for all Unicode strings, which I think is what Python 3 does when writing For my own project I'm working around this with an extension module that uses |
Hello!
I'm using jrnl, on which I had some problems to create records with accents. After solving that problem, I'm having a strange problem with colorama, which produces
IOError: [Errno 0] Error
on the methodwrite_plain_text
of ansitowin32.py file, as you can see below:Also, take a look at my original Issue, on jrnl: https://github.com/maebert/jrnl/issues/391#issuecomment-228336524
This error only happens when I use
chcp 65001
command, to use UTF-8 on the cmd.exe terminal, and the file that was read, is inutf-8
encoding.I'm using Windows 7 (64-bits), with Brazilian Portuguese as main language (which usually uses Latin-1 as encoding). The characters on cmd.exe terminal are being treated as ascii, always.
Any thoughts?
The text was updated successfully, but these errors were encountered: