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

readline: text manipulation does not handle characters comprised of two UTF-16 code units #25693

Closed
Avi-D-coder opened this issue Jan 25, 2019 · 1 comment
Labels
readline Issues and PRs related to the built-in readline module.

Comments

@Avi-D-coder
Copy link
Contributor

Avi-D-coder commented Jan 25, 2019

  • Version: v11.7.0
  • Platform: Linux hostname 4.20.3-arch1-1-ARCH #1 SMP PREEMPT x86_64 GNU/Linux

readline backspace and delete do not handle astral characters correctly. If the cursor is within one char of the non UTF-16 char then delete, backspace, and or inserting a letter may not function correctly. Specifically they may delete one of the two code points, act on the astral char when they should be acting upon its neighbor, or insert between the two codepoints comprising an astral character.

@Avi-D-coder Avi-D-coder changed the title readline: Backspace and delete do not handle characters comprised of two UTF-16 code units readline: text manipulation does not handle characters comprised of two UTF-16 code units Jan 25, 2019
@Avi-D-coder
Copy link
Contributor Author

Found the problem. I will submit a PR.

@Fishrock123 Fishrock123 added the readline Issues and PRs related to the built-in readline module. label Jan 25, 2019
Avi-D-coder added a commit to Avi-D-coder/node that referenced this issue Jan 26, 2019
addaleax pushed a commit that referenced this issue Mar 1, 2019
Prevents moving left or right from placing the cursor in between code
units comprising a code point.

PR-URL: #25723
Fixes: #25693
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
readline Issues and PRs related to the built-in readline module.
Projects
None yet
Development

No branches or pull requests

2 participants