//It can include other characters
public string uncode(string str)
{
string outStr = "";
Regex reg = new Regex(@"(?i)//u([0-9a-f]{4})");
outStr = (str, delegate(Match m1)
{
return ((char)Convert.ToInt32([1].Value, 16)).ToString();
});
return outStr;
}
//Convert Chinese to UNICODE characters
string str = "Chinese";
string outStr = "";
if (!(str))
{
for (int i = 0; i < ; i++)
{
//Convert Chinese characters to decimal integers, and then convert them to hexadecimal unicode characters
outStr += "//u" + ((int)str[i]).ToString("x");
}
}
//UNICODE characters are converted to Chinese
string str = "//u4e2d//u6587";
string outStr = "";
if (!(str))
{
string[] strlist = ("//","").Split('u');
try
{
for (int i = 1; i < ; i++)
{
//Convert unicode characters to decimal integers and then convert them to char Chinese characters
outStr += (char)(strlist[i], );
}
}
catch (FormatException ex)
{
outStr = ;
}
}