带有特殊字符的SMS的GSM编码(Twilio) [英] GSM encoding for SMS with special characters (Twilio)

查看:300
本文介绍了带有特殊字符的SMS的GSM编码(Twilio)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望,您可以通过此查询为我提供帮助.

I hope and you can help me with this query that I have.

我需要发送带有特殊字符的消息,以避免对消息进行过多分割,也就是说,如果 GSM 消息的最大字符数为160,并且我写的消息低于限制允许GSM,原因是它至少具有一个特殊字符,因此此消息更改为 UCS2 .

I need to send messages with special characters avoiding to segment the message too much, that is, if the maximum number of characters for a GSM message is 160 and I write a message lower than the limit allowed for GSM with the simple fact of having at least one special character this message is change to UCS2.

我不知道是否有办法避免这种情况,并且该消息仅使用GSM编码,而没有导入特殊字符以防止消息花费更多.

先谢谢您的问候.

示例(文本):

编码:GSM

消息:HolaSeñorCliente le informationamos que yaestádisponible sucrédito,是由西班牙联邦商标局00110011001提供的.

Message: Hola Señor Cliente le informamos que ya está disponible su crédito, acuda a las oficinas de Compañia o marque al 00110011001.

长度:125

段:1

编码为:UCS2

消息:HolaSeñorCliente le informationamos que yaestádisponible sucrédito,是由西班牙联邦商标局00110011001提供的.

Message: Hola Señor Cliente le informamos que ya está disponible su crédito, acuda a las oficinas de Compañia o marque al 00110011001.

长度:125

段:2

示例(图片):

GSM

UCS2

推荐答案

此处是Twilio开发人员的福音.

Twilio developer evangelist here.

您不能将特殊字符作为GSM编码的消息发送,因为这些字符在GSM字符集中不存在.这就是为什么Twilio将这些消息编码为UCS2(实际上是UTF16大字节序)的原因.但是,当消息以UCS2编码时,只能容纳70个字符.

You cannot send special characters as a GSM encoded message because those characters do not exist within the GSM character set. This is why Twilio encodes those messages as UCS2 (well, really as UTF16 big endian). However when messages are encoded in UCS2, you can only fit 70 characters.

确保您的邮件未编码为UCS2的唯一方法是避免 GSM字符集.

The only way to ensure that your messages are not encoded as UCS2 is to avoid any characters outside of the GSM character set.

您可以在让我知道这是否有帮助.

Let me know if that helps at all.

这篇关于带有特殊字符的SMS的GSM编码(Twilio)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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