如何在C#中使用
我尝试使用以下代码:
at
命令发送阿拉伯短信?当我发送阿拉伯消息时,它显示不正确的字符。我尝试使用以下代码:
serialPort1.BaseStream.Flush();
string cb = char.ConvertFromUtf32(26);
System.Threading.Thread.Sleep(2000);
this.serialPort1.Write("AT+CMGF=1\r");
this.serialPort1.Write("AT+CSCA=servicecenter\r\n");//Ufone Service Center
this.serialPort1.Write("AT+CSCS=\"" + "HEX" + "\"\r\n");
this.serialPort1.Write("AT+CSMP=\"" + 1 + "," + 167 + "," + 0 + "," +8+ "\"\r\n");
this.serialPort1.Write("AT+CMGS=\"" + textBox1.Text + "\"\r\n");// message sending
this.serialPort1.Write(textBox2.Text + cb);//message text
我在文本框中输入了06450631062D06280627。