Skip to content
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

[REQUEST] Handle other alphabets in input fields #152

Open
jbaublitz opened this issue Aug 30, 2024 · 4 comments
Open

[REQUEST] Handle other alphabets in input fields #152

jbaublitz opened this issue Aug 30, 2024 · 4 comments
Labels
Enhancement New feature or request

Comments

@jbaublitz
Copy link

Is your feature request related to a problem? Please describe.
I was planning on using this for a terminal user interface for a flashcard app, but the text input doesn't seem to be able to display the Cyrillic or Arabic alphabet. I'm not sure if this is related to encoding or if there's a way to make the text inputs accept UTF-8, but currently those alphabets aren't displayed when you type them.

Describe the solution you'd like
I'd like difference alphabets to be able to be displayed when typed into a text box.

Is this feature present in other TUI products?
Yes.

Additional context
Arabic might be a little bit hard to handle only because it goes right to left and is cursive, but Cyrillic is usually pretty easy to implement with simply UTF-8 encoding.

@jbaublitz jbaublitz added the Enhancement New feature or request label Aug 30, 2024
@bczsalba
Copy link
Owner

Does your terminal handle them correctly? I don't see any reason they shouldn't already work, IIRC emoji (mostly) do and those should be more complicated.

@jbaublitz
Copy link
Author

Yes, my terminal does handle them correctly. Specifically the behavior I'm seeing is that when I type Cyrillic into the text input box, nothing is displayed.

@bczsalba
Copy link
Owner

bczsalba commented Sep 1, 2024

If you run ptg -g and enter a cyrillic character, what does it output?

@jbaublitz
Copy link
Author

This was the output.

PyTermGUI - Getch-practice/ ptg -g                  

┌────────────────────────────────────────────────┐
│                   Your output                  │
│                                                │
│ key                                   '\u0440' │
│ value:                                '\u0440' │
│ len()                                        1 │
│ real_length()                                1 │
└────────────────────────────────────────────────┘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants