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

Calc character width correct #107

Open
heroboy opened this issue Nov 15, 2023 · 2 comments · May be fixed by #109
Open

Calc character width correct #107

heroboy opened this issue Nov 15, 2023 · 2 comments · May be fixed by #109

Comments

@heroboy
Copy link

heroboy commented Nov 15, 2023

Should correctly calc the char width in console. Not simply using String.Length.

Consider this implement:

https://github.com/gui-cs/NStack/blob/92b5d7f56bad11a9ce637797d0c8c4a14d6f50c5/NStack/unicode/Rune.ColumnWidth.cs#L152

@frg2089
Copy link

frg2089 commented Jan 18, 2024

Some characters are twice as wide as normal ASCII characters.

image

Even though we have ProgressBarOptions.MessageEncodingName to mitigate this.
But I think encoding length and character width are two different things.

@heroboy
Copy link
Author

heroboy commented Jan 19, 2024

The current implementation is from #82
It is totally wrong. It can be a workaround to be used in a limited area. But it shouldn't be merged.

@frg2089 frg2089 linked a pull request Jan 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants