-
Notifications
You must be signed in to change notification settings - Fork 70
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
Some non-ascii input echos wrong characters or fails to decode #202
Comments
I was able to reproduce your issue, but I don't get an exception for The problem is, Python, as far as I can tell, does not relay code page 437, even when that's what chcp reports. This is how we currently detect the encoding. In your setup, this would set it to Line 328 in b6025ec
An alternative way to do this you might see is to look at So I think the way to make this work is going to be to add a method to Jinxed that can call the GetConsoleCP() C function and then have Blessed call that. I'll make the changes to Jinxed and make a new release, then create PR for Blessed. |
Looks like it's working 👍 |
By the way, it seems it's not necessary to use the WinAPI, pure Python should be enough.
|
I'm still having this issue even when using blessed 1.18.1. Here are some wrong characters:
Some other keys also produce wrong characters. |
Sorry to hear that. |
Jinxed version is 1.1.0, |
As per the comments in this issue, it seems that |
What does |
|
After checking out the sources, it seems that the blessed 1.18.1 in pip doesn't have the newest Edit: The GitHub release tarball installed with pip fixes the problems with the previously broken characters. |
Oh! Good catch! |
1.19.0 was just pushed. This should resolve your issue. |
Works fine now 👍 |
Hi!
Running the editor example https://github.com/jquast/blessed/blob/master/bin/editor.py on
Windows 10 x64
,blessed==1.18.0
and Python 3.7, 3.8 or 3.9 yieldswhen I try to input a German umlaut
ü
(using the US-International keyboard layout you can type"
+u
). Runningchcp
outputsActive code page: 437
whereas the traceback showscp1252
.Typing
ß
(alt
+s
) gives me aá
. So someting is messing up the encodings here.Entering either in the cmd prompt or the interactive python interpreter is not a problem and displays fine.
The text was updated successfully, but these errors were encountered: