-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pull in utf8 support #27
Conversation
This is the first batch of changes from an upstream PR that provides UTF8 support. As a side effect, it means that we now will have the correct support for escape sequences in single and multiline mode. We previously merged in a smaller change which provided support for single line mode with escape sequences by fixing the cursor position but this is more comprehensive. The next commit will add the UTF8 library. Author: https://github.com/yhirose PR: antirez/linenoise#187
This is the second half of the PR that I'm merging in from upstream. It adds UTF8 13.0 support by including an extra library to get the char width of those characters (the visual width that is). During testing things seem to work quite well. I'm impressed. Author: https://github.com/yhirose PR: antirez/linenoise#187
It looks like the old default version of |
This should be good enough for now. I'll create an issue about finding an alternative for |
@yhirose The original PR worked really well for adding UTF-8 support to Linenoise. Thanks! |
This PR pulls in UTF8 support from the antirez/linenoise#187 branch as a part of #21. So far so good but I want to update docs and do some more testing before merging.
It only covers unicode version 13.0 but that's way better than what it was before. In all likelihood I won't need the additional unicode characters that were added in 14.0 and 15.0 but I should document how this was generated as best as possible so that I could technically move to that in the future.
Anyway, I'm very impressed so far.
TODO:
Document process of generating the character widthsSee about updating tests to account for this UTF8 supportexpect
that supports UTF-8 and runs on CI