Open heroboy opened 7 months ago
Some characters are twice as wide as normal ASCII characters.
Even though we have ProgressBarOptions.MessageEncodingName
to mitigate this.
But I think encoding length and character width are two different things.
The current implementation is from https://github.com/Mpdreamz/shellprogressbar/pull/82 It is totally wrong. It can be a workaround to be used in a limited area. But it shouldn't be merged.
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