-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CJK characters are not treated as double width chars #62
Comments
Thanks for reporting. Will take a look at this along with the rest international character issues. |
@parisk To support this you gonna have to include the wcwidth calculation for any Unicode codepoint (see |
I had a look at your line at cell abstraction - this is pretty much the same I did in my emulator. If you like I can extend your isWide and write functions with the wcwidth stuff in a PR. |
Interesting. Do you believe that this could be handy? http://code.woong.org/wcwidth.js |
yes, it should do the trick, though it is not 100% xterm compatible (xterm uses a slightly different version of it). If xterm compatibility is a major concern for xterm.js, we'd have to strip the lookup tables from their sources. |
You can look at a solution to this here chjj/term.js#97 |
That seems to work for BMP fullwidth characters. Surrogates are still failing in width and cursor positioning as you can test with these characters: 𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡 |
Closed in #144. |
See chjj/term.js#96
vs gnome-terminal:
Notice the characters are exactly 2 ascii characters in width
The text was updated successfully, but these errors were encountered: