I am comparing some Vietnamese names in Javascript. However if I copy a Vietnamese name such as "Sở giao dịch" and paste to compare with the other (using web UI) I am able to compare.
But If I type directly Vietnamese name as above then cannot compare.
I think this is because when copying the text string and comparing then the same unicode character is being compared, but when typing then other unicode character is presented.
So comparing "Sở" and "Sở" should give 0, but its not because one is copied and other is typed. But if both are copied then no problem in comparing.
So, how to compare two unicode strings that looks alike but in fact different unicode?
Btw, this question answers it but using C#, I am using javascript.