Here's part of the data from my SQL table:
When I fetch data show me like below
But when I use equal condition, it returns false
I check ASCII code and I am confused because it is different.
this.NameOfComm :
"doc" :
If you look very closely, you will note that, in your first screenshot, the DOC in the first line has a slightly different font than the one in the second line.
D O C , whereasD O C from the Unicode block U+FF00–FFEF. These are special forms of the Latin characters used to align nicely with Chinese/Japanese/Korean characters.(In addition, the fullwidth form characters seem to be HTML encoded, but that might be an artifact of your analysis.)
You can use string.Normalize to "fix" this:
// prints DOC
Console.WriteLine("DOC".Normalize(NormalizationForm.FormKC));
disU+FF44is compart.com/en/unicode/U+FF44 - which is not ASCIID.