Hi Max,
I'm sure there are better solutions for this (something along the line of
Server.HtmlEncode), but you can always do it the hard way.
string s = "અમદાવાદ";
string t = "અમદાવાદ";
On way (might benefit of a StringBuilder for larger strings)
string ss = "";
for (int i = 0; i < s.Length; i++)
ss += "&#" + ((int)s[i]) + ";";
if(ss == t)
// match
Or the other way around
string[] ts = t.Split(';');
char[] cs = new char[ts.Length - 1];
for (int i = 0; i < cs.Length; i++)
cs[i] = (char)int.Parse(ts[i].Substring(2));
string tt = new string(cs);
if(s == tt)
// match
On Tue, 05 Sep 2006 08:13:10 +0200, Max <mahesh.anjani (AT) gmail (DOT) com> wrote:
Quote:
hi
i want to compare a unicode string "અમદાવાદ" with a
string fetched from database, example code is given below.
str contain value fetched from database and
"અમદાવાદ" is unicode of
"અમદાવાદ".
if str = "અમદાવાદ" then
end if
how to do this in asp.net
please let me know if any one has solution. |
--
Happy Coding!
Morten Wennevik [C# MVP]