c# 如何发送>127的扩展ASCII码对应的字符?
请问各位大侠如何在c#中实现类似于DELPHI中的chr函数功能呢?不甚感激!!!想通过串口发送127~255扩展ASCII码对应的字符,但是发送出去的数是乱码,跟预期值不一样!
char[] ff12 = new char[5];
ff12[0] = 0xFD;
ff12[2] = 0x0F;
ff12[2] = 0x08;
ff12[3] = 0x04;
ff12[4] = 0xFE;
byte[] ff13 = Encoding.UTF8.GetBytes(ff11);
string ff14 = Encoding.UTF8.GetString(ff13);
serialPort1.Write(ff14);