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

Unable to input full-width characters #432

Open
Pandaft opened this issue Jul 29, 2023 · 2 comments
Open

Unable to input full-width characters #432

Pandaft opened this issue Jul 29, 2023 · 2 comments
Labels
upstream_issue This issue is caused by an upstream package

Comments

@Pandaft
Copy link

Pandaft commented Jul 29, 2023

Environment:

  • Windows 10 22H2
  • Python 3.11.4
  • python-inquirer 3.1.3

Code:

import inquirer

answers = inquirer.prompt([
    inquirer.Text('msg',
                  message="message"),
])

Reproduce:

When I try to type Chinese:

1

It turned out:

2

This problem also occurs with other full-width characters, such as Korean and Japanese.

@Cube707
Copy link
Collaborator

Cube707 commented Jul 29, 2023

This stems from the libary function readchar using only the msvcrt.getch() function, which only returns single bytes (Its old, from a time where ascii was the only characterset).

There are plans to fix that in an upcoming version, but there's no timeframe on when I will come around to it.

@Cube707 Cube707 added the upstream_issue This issue is caused by an upstream package label Jul 30, 2023
@Cube707
Copy link
Collaborator

Cube707 commented Jul 30, 2023

Relevant: magmax/python-readchar#93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream_issue This issue is caused by an upstream package
Projects
None yet
Development

No branches or pull requests

2 participants