How to enter accented characters? #177
Unanswered
shadowtempest91
asked this question in
Q&A
Replies: 2 comments
-
In the meanwhile I made some other test. This issue doesn't present itself if I type those characters after a gets command:
Which seems to imply that the issue is only relative to tty-prompt. I activated UTF-8 experimental support for the terminal but that doesn't change anything. |
Beta Was this translation helpful? Give feedback.
0 replies
-
New thing that might be of use to understand the issue: I found out that something similar happens if I try to use tty-spinner. The character of the spinner is not correctly shown:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings,
I'm working on Windows 10, I'm italian and I'm having issues in using tty-prompt to enter data containing accented letters.
Accented letters such as àèìòù are shown correctly when printed by the prompt, but are substituted with weird characters when entered by the user.
Here's an example:
The outcome changes a little bit if I try to change the code table to 65001:
Setting the expected encoding when calling the script from shell (
ruby -E utf-8 mwe.rb
) doesn't change anything.This seems somewhat very similar to this other issue reported a couple of years ago, related to cyrillic characters instead of italian ones: https://github.com/piotrmurach/tty-prompt/issues/115. I tried to solve it the way it was suggested there, which was to add
(env: { "TTY_TEST" => true })
when declaringTTY::Prompt.new
. Though, this triggers this error the instant I press one of those characters on the keyboard:Here's the complete error message:
Beta Was this translation helpful? Give feedback.
All reactions