发送特殊字符作为消息; [英] Sending Special characters as a message;
问题描述
可能是一个字符集的问题。短信通常用GSM7字符集接收,您给出的字符具有不同的GSM7数字代码,例如ISO-8859-1。您应该将GSM7转换为您自己的字符编码。
由于另一个原因,char @可能有问题。在GSM7中是0(零)。如果你按照原样离开它,你的编程语言使用一个零终止的字符串 - 所有包含@的字符串将看起来像在这个字符之前终止。
请参阅此处 GSM7字符表。
I'm running Kannel which i use as an SMS gateway. But I've just realized some special symbols are not received on phone as they should; @, ^ and $ are sent as some triangle; How can i resolve this?
Probably a charset problem. SMSes are usually received with GSM7 charset, and the characters you gave have different GSM7 numeric codes that, for example, ISO-8859-1. You should convert from GSM7 to your own character encoding.
The char @ may be problematic for another reason. In GSM7 it is s 0 (zero). If you leave it as it is and your programming language uses a zero-terminated strings -- all strings containing @ will look like they terminated just before this character.
See here for a table of GSM7 characters.
这篇关于发送特殊字符作为消息;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!