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

The package does not handle UTF-8 prompts properly #13

Open
Ailrun opened this issue Dec 3, 2019 · 1 comment
Open

The package does not handle UTF-8 prompts properly #13

Ailrun opened this issue Dec 3, 2019 · 1 comment
Labels
bug help wanted long-term to be done at some point, no deadline

Comments

@Ailrun
Copy link

Ailrun commented Dec 3, 2019

Description

After I used λ as a prompt message, ocaml-linenoise displayed a cursor at a wierd position.
For example, when I typed abc (without a space), my terminal displays something like this.

λ abc _
     ^ Here is a weird space

What you expected

ocaml-linenoise handles λ (and any other UTF-8 encoded characters) in a proper way so that it places characters and the cursor at expected positions like the following.

λ abc_
     ^ This underscore is the cursor.

Reproduction

https://github.com/Ailrun/ocaml-linenoise-issue-13
This repository also includes instructions to reproduce the bug.

@c-cube c-cube added bug help wanted long-term to be done at some point, no deadline labels Dec 3, 2019
@c-cube
Copy link
Member

c-cube commented Dec 3, 2019

Indeed, the C linenoise library doesn't support unicode. I don't see a simple way to fix that for now, but it should definitely be on the road map.

@pmetzger pmetzger changed the title Do not handle UTF-8 prompt properly Package does not handle UTF-8 prompts properly Dec 4, 2019
@Ailrun Ailrun changed the title Package does not handle UTF-8 prompts properly The package does not handle UTF-8 prompts properly Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted long-term to be done at some point, no deadline
Projects
None yet
Development

No branches or pull requests

2 participants