-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix Unicode Input Issue and OSError in Test Script #119
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those are my imidieate thought on the changes.
Also, how this this new behavior compare to Linux? can all wide-charcters allready be read on linux systems or must changes be also implemented there?
I tested it on macOS without any issues. The original problem seems to occur only on Windows. |
So you tested with relevant characters on MacOS? |
I apologize for my incomplete explanation. I initially noticed this issue on Windows, so I fixed it. However, I also noticed that Windows handles this differently compared to Linux and macOS. I tested it on macOS, and it showed that macOS can natively handle Unicode character input perfectly. |
After my investigation, it appears that some emojis are encoded using UTF-8 surrogates, which may appear as two characters in the terminal (you can observe this if you select them with your cursor). This is related to the issue of "surrogates not allowed." Perhaps you could use a try-except block to handle UnicodeEncodeError, as this error is raised by getwchar(). |
I might have found a solution, so please stay tuned. |
Still strang that it works fine on linux |
Linux works fine without this issue. |
this seems to be a good solution, but I would prefer that code in the I will implement that now |
Co-authored-by: Jan Wille <[email protected]>
Co-authored-by: Jan Wille <[email protected]>
Co-authored-by: Jan Wille <[email protected]>
No description provided.