//静态方法ConvCHAR()用于把整数转化为ASCII字符。
//输入任意大于零的整数都可转换为大写的A-Z.
public static string ConvCHAR(int pPosition)
{
string PreChar = "";
if(pPosition > 26)
{
pPosition %= 26;
PreChar = "A";
}
byte aByte = byte.Parse((pPosition + 64).ToString());
byte[] bytes1 = {aByte,0x42,0x43};
byte[] bytes2 = {0x98,0xe3};
char[] chars = new char[3];
Decoder d = Encoding.UTF8.GetDecoder();
int charLen = d.GetChars(bytes1,0,bytes1.Length,chars,0);
//The value of charLen should be 2 now.
charLen += d.GetChars(bytes2,0,bytes2.Length,chars,charLen);
foreach(char c in chars)
{
Console.WriteLine("U+" + ((ushort)c).ToString() + " ");
return PreChar = c.ToString();
}
return "Need an entry";
}