我读了这篇文章来发送 Unicode 短信,但我想知道如何阅读 utf8 信息?
通过 GSM 调制解调器使用 AT 命令在 C# 中发送 Unicode 消息(例如波斯语和阿拉伯语)
我发送此命令但收到的消息文本类似于:
AT+CMGL="ALL"
+CMGL: 1,"REC READ","97563937625","","2013/08/28 00:53:30+18"
0041006A006D0064006A00740020
我阅读短信的命令:
ExecCommand(port,"AT", 300, "No phone connected");
ExecCommand(port,"AT+CSCS=\"UCS2\"\n", 300, "No phone connected");
ExecCommand(port,"AT+CMGF=1", 300, "Failed to set message format.");
ExecCommand(port,"AT+CPMS=\"MT\"", 300, "Failed to select message storage.");
string input = ExecCommand(port, "AT+CMGL=\"ALL\"", 5000, "Failed to read the messages.");