I am trying to get the Chinese character from receiving Hex values. For example I am receiving "4560597D5417" for chinese "你好吗"(How are you) And my program is sending message to user hand phone but my program does not convert Hex values into chinese that's why user can see "4560597D5417" instead of the "你好吗". To over come this situation I have to convert the Hex into chinese to send into users hand phone. Here is one example I have taken from the internet but I am not getting my result with it:
public static string ConvertHex(String hexString)
{
try
{
string ascii = string.Empty;
for (int i = 0; i < hexString.Length; i += 2)
{
String hs = string.Empty;
hs = hexString.Substring(i, 2);
uint decval = System.Convert.ToUInt32(hs, 16);
char character = System.Convert.ToChar(decval);
ascii += character;
}
return ascii;
}
catch (Exception ex) { Console.WriteLine(ex.Message); }
return string.Empty;
}
Appreciate any help.