Click to See Complete Forum and Search --> : how to compare chinese character in javascript?
xinran
05-09-2003, 02:13 PM
The way to compare like english words gives a wrong result when compare chinese string.
Is there a way to do this? I search and search in several searching engine and got nothing useful.
Thanks!
It's possible, but you have to define each word in the English dictionary.... Or, using Server-side languages, you can test the charset; but other than that, I doubt it's possible without a lot of work.
khalidali63
05-09-2003, 02:42 PM
any character as long as it satisfys being an ASCII defined character it should be compareable with ==
xinran
05-12-2003, 09:40 AM
I found the way, using the function sting.localecompare() instead of comparision operator .
sting.localecompare() can be used to compare string on the client side according to client side locale setting.
Thank jona & khalidali63 for helping me.