Sending Special characters as a message;

北战南征 提交于 2019-12-12 21:23:03

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/12708074/sending-special-characters-as-a-message

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!