发送特殊字符作为消息; [英] Sending Special characters as a message;

查看:179
本文介绍了发送特殊字符作为消息;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行我用作短信网关的Kannel。但是我刚刚认识到一些特殊的符号在手机上不被接收, @,^和$作为一些三角形发送;我如何解决这个问题?

解决方案

可能是一个字符集的问题。短信通常用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆