Closed sdwdjzhy closed 1 week ago
This is not an urgent issue, I'll wait for Nuget to release it
I am wondering if I need to provide an event to correct the width, pass in the current character, return whether it has been processed, and customize the width
class Arg
{
public bool Handle { get; set; }
public int? Width { get; set; }
}
// the event like
void Fun(char c, Arg e)
{
if(e.Handle) return;
if (c == '℃')
{
e.handle = true;
e.Width = 2;
}
// Other, handle by default
// e.Handle = false;
// e.Width = null;
}
Moving this issue over to the wcwidth repository, since it's a bug there.
i see the pull request will be automatically merged. Do you need to review it?
@sdwdjzhy You haven't created a pull request for this issue, so not sure what will be merged.
It looks like this has something to do with your terminal font, because ℃ and ℉ are not considered to be wide characters.
Maybe ℃
and ℉
aren't available in your terminal font, and the terminal falls back to another font with a different width?
I've tested this using 6 terminals on 3 different OSes and cannot reproduce what you're seeing.
Information
Describe the bug
Some special characters cannot be counted as 2, like ℃、℉
To Reproduce
Expected behavior Table alignment
Screenshots
Additional context Add any other context about the problem here.
Please upvote :+1: this issue if you are interested in it.