c#下:
array[0] = (byte)t1;
string ch = System.Text.Encoding.Default.GetString(array); //字节解码成汉字...
wince下 没有GetString()方法;
请问一下,wince下怎么将内码转换成汉字??
//unicode解码方式下的汉字码
array = System.Text.Encoding.Unicode.GetBytes("啊");
i1 = (short)(array[0] - ''\0'');
i2 = (short)(array[1] - ''\0'');
//unicode反解码为汉字
string str = "4a55";
string s1 = str.Substring(0,2);
string s2 = str.Substring(2,2);
int t1 = Convert.ToInt32(s1,16);
int t2 = Convert.ToInt32(s2,16);
array[0] = (byte)t1;
array[1] = (byte)t2;
string s = System.Text.Encoding.Unicode.GetString(array);