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
msvcrt bytes cleanup #49660
Comments
I came from bpo-5391. Here is quote of Victor's message.
And msvcrt.ungetwch() calls _ungetch not _ungetwch. Here is the patch |
... are you sure that someone already used these functions? :-) If you suppose that bpo-5499 is fixed, you can leave msvcrt_putch() |
Patch implementing my proposition (depends on bpo-5499). |
bpo-5499 is fixed, so msvcrt_wchar.patch can now be used :-) Anyone |
There seems to be a problem with ungetwch(): >>> s = msvcrt.getwch()
# Here I type the Euro sign (€)
>>> ascii(s)
"'\\u20ac'"
>>> msvcrt.ungetwch(s)
>>> u = msvcrt.getwch()
>>> ascii(u)
"'\\xac'" |
I think this can wait until the first beta. |
I tested Visual C++ Express 2008 and it looks like _ungetwch() only My patch (msvcrt_wchar.patch) makes the situation better, but it's not msvcrt.getwch() works correctly with characters with code > 255 (eg. |
MSDN says _ungetwch returns WEOF instead of EOF when error occurs. I cannot see any remarks about masking behavior. :-( |
I asked on a french Windows developer channel. The answer is that the Anyway I think that my patch (msvcrt_wchar.patch) makes the situation |
Ok, I updated my patch (to use WEOF). |
Applied in r72185. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: