How to compare Unicode characters that “look alike”?

前端 未结 10 1156
情歌与酒
情歌与酒 2020-11-27 10:42

I fall into a surprising issue.

I loaded a text file in my application and I have some logic which compares the value having µ.

And I realized that even if

10条回答
  •  囚心锁ツ
    2020-11-27 11:32

    It's possible to draw both of chars with the same font style and size with DrawString method. After two bitmaps with symbols has been generated, it's possible to compare them pixel by pixel.

    Advantage of this method is that you can compare not only absolute equal charcters, but similar too (with definite tolerance).

提交回复
热议问题