I had an input field which had a space , some browsers were giving different hex for space in these input fields.
Finally I found , a space may not be a space there are as much as 25 different representations for space in Hex.
.Replace((char)0xA0, ' ') worked but better way is using .Normalize(System.Text.NormalizationForm.FormKC)
Reference : http://msdn.microsoft.com/en-us/library/ebza6ck1(v=vs.80).aspx
and http://msdn.microsoft.com/en-us/library/system.text.normalizationform(v=vs.80).aspx
Difference between :
ReplyDeleteSystem.Text.NormalizationForm.FormC
System.Text.NormalizationForm.FormD
System.Text.NormalizationForm.FormKC
System.Text.NormalizationForm.FormKD
Available here :
http://www.unicode.org/reports/tr15/#Norm_Forms
Normalization in javascript :
ReplyDeletehttps://github.com/patch/unicode-programming/blob/master/normalization/javascript.md