-
Notifications
You must be signed in to change notification settings - Fork 374
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
Fix rendering of multi-byte strings #231
Conversation
This fix issue that trembox-go on Windows Terminal does not work correctly with multi-byte strings. |
My Windows language is set to English if that's what you mean. I simply copy-pasted a CJK character from google.
|
It's an East Asian Ambiguous Width. The width of bar might be changed with locales you are using. Also the width is not compatible on Windows and wcwidth(2). go-runewidth follows wcwidth(2). |
Anyway, this is not related on this pull-request. |
Thank you. But what is about the cursor issue and the spacing after the cjk character (both in the second gif)? Am I the only one having it? Your screenshot doesn't look like it. |
What value do you get with |
Active codepage: 437 |
@nsf the issue @scrouthtv mentioned is another issue that must be fixed. So let's merge this? |
https://docs.microsoft.com/en-us/windows/console/reading-and-writing-blocks-of-characters-and-attributes
https://docs.microsoft.com/en-us/windows/console/char-info-str
In latest cmd.exe, multi-byte strings must be handled with attributes of COMMON_LVB_XXX.