Send Texte SMS in arabic

Send Texte SMS in arabic SearchSearch
Author Message
chabiou
New member
Username: Djelloulc

Post Number: 2
Registered: 08-2004
Posted on Tuesday, August 10, 2004 - 05:03 pm:   

Hello, question about Send Texte SMS in arabic
I don't know whats is the conversion
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3237
Registered: 10-2002
Posted on Tuesday, August 10, 2004 - 10:11 pm:   

Start by sending text using the "Send Text Message" form, and verify that is working correctly.

If you are trying to send text by URL, NowSMS defaults to expecting UTF-8 encoding of the text in the URL.

If you want to include text in the URL without converting it to UTF-8, you need to include an "&charset=xxxxx" parameter in the URL request. For example, "&charset=iso-8859-6" would specify Arabic.
chabiou
New member
Username: Djelloulc

Post Number: 4
Registered: 08-2004
Posted on Wednesday, August 11, 2004 - 03:50 pm:   

Sending text using the "Send Text Message" form, not working correctly.

I want to include text in the URL using "&charset=iso-8859-6" parameter in the URL request.
http://192.168.0.1:8800/Send Text Message.htm?PhoneNumber=071872855&Text=xxxxxxx&InfoCharCounter=&PID=&Submit=Subm it&charset=iso-8859-6
i teste this message but they don’t work correctly

Can you give me an complete example
Thanks you for your answer
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3247
Registered: 10-2002
Posted on Wednesday, August 11, 2004 - 08:25 pm:   


quote:

Sending text using the "Send Text Message" form, not working correctly.




If this is not working correctly, then there is an issue with your configuration.

Please explain how you are making your SMSC connection from NowSMS.

Let's resolve this first, and then we can move on to the direct URL requests.

-bn
chabiou
New member
Username: Djelloulc

Post Number: 5
Registered: 08-2004
Posted on Sunday, August 15, 2004 - 04:52 pm:   

Sending text using the "Send Text Message" form, working correctly with English text

Can you give me an complete example for direct URL requests
Thank you for your help.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3261
Registered: 10-2002
Posted on Monday, August 16, 2004 - 04:05 pm:   

But if it is not working with Arabic text, then I cannot explain to you how to do it directly with a URL request.

The "Send Text Message" form should work correctly with either English text or Arabic. If the form does not work with Arabic, then a URL request is not going to work either.

That is why I wanted to get more information about your type of SMSC connection. GSM modem, SMPP, HTTP SMSC, other?

I think we need to figure out why that is not working properly before we can move on to the URL. (The URL that you included above would be fine.)

-bn
chabiou
New member
Username: Djelloulc

Post Number: 6
Registered: 08-2004
Posted on Tuesday, August 17, 2004 - 09:32 am:   

Thank you for your answer

If I use "Send Text Message” with Arabic text I receive another text in my cellular phone who support Arabic text the problem are the conversion of the text and how to do it directly with a URL request.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3281
Registered: 10-2002
Posted on Tuesday, August 17, 2004 - 07:52 pm:   

Ok. If the "Send Text Message" form is working for sending Arabic text, then we can move on.

The following URL would be sufficient:


http://192.168.0.1:8800/?PhoneNumber=00000000&Text=xxxxxxx&charset=iso-8859-6

In this case, xxxxxx would be the Arabic text that you want to send. This assumes that the text is encoded in Arabic, whereas if you enter the Arabic text into the browser URL window, the browser might change the encoding.

Therefore, it is best to URL escape the Arabic text.

I do not speak Arabic, but let me take a random character as an example. Let's take the Arabic letter Beh, shown below:

ب

This is Unicode character code 0x0628.

In the local Arabic character set (iso-8859-6), it has the character code 0xC8.

If we wanted to send a message with just this character present, we would use the following command:

http://192.168.0.1:8800/?PhoneNumber=00000000&Text=%C8&charset=iso-8859-6

Or, you could submit the character using UTF-8 format:

http://192.168.0.1:8800/?PhoneNumber=00000000&Text=%D8%A8&charset=iso-8859-6

(It is difficult to explain UTF-8, and how 0x0628 gets converted to %D8%A8, but many development environments include tools for performing UTF-8 encoding.)


Or, if it is easier for you to work in Unicode, you can convert the entire message text to a Unicode format and submit it as a binary message:

http://192.168.0.1:8800/?PhoneNumber=00000000&Text=0628&dcs=8&binary=1

In this case, DCS=8 means Unicode binary format, and 0628 is the hex unicode representation of the Arabic letter Beh.
Anonymous
 
Posted on Tuesday, August 24, 2004 - 01:46 pm:   

HI,
Im just wondering where I how I could find the supported character sets for the following languages: Chinese and Arabic.

As I understand from this post, Arabic requires UTF-8 support, what about Chinese?

Is there a chart that one can refer to or any other information that could be relevant for this? By default, Im guessing every SMSC supports ISO8859, if that is so, then why should sending a text msg in Arabic require UTF-8 support as well?

TIA.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3345
Registered: 10-2002
Posted on Wednesday, August 25, 2004 - 05:11 pm:   

As mentioned above, the local character set for Arabic is iso-8859-6 (the standard character set used on a computer running in that region). You can find some good tables of that character set by simply searching the web on a keyword of "iso-8859-6".

There are two different Chinese character sets, commonly known as "big5" (traditional) and "gb2312" (simplified or "gbk").

I believe that "big5" is more commonly used in Hong Kong and Taiwan, while "gb2312" is more commonly used on the mainland.

Both "big5" and "gb2312" are double byte character sets (DBCS). Standard english characters are represented as a single byte, but Chinese characters are represented with two bytes.

Unicode is a 16-bit character set that attempts to include all characters from different languages used globally. So both Arabic and Chinese characters are included in the Unicode character set.

UTF-8 is a mapping of Unicode so that Unicode can be represented using an 8-bit encoding. Like with a DBCS character set, standard English characters are represented in a single byte, but extended characters require 2 or 3 bytes.

There are direct algorithms for converting Unicode to UTF-8 and vice versa, as both use the same character set, but simply a different way of encoding the values of the character set.

GSM SMS uses its own character set, sometimes referred to as IA5. It is a 7-bit character set. A table of the GSM character set can be found at the following link:

http://support.nowsms.com/discus/messages/1/1103.html

So even English text needs to be converted into this character set in order to be sent out over SMS.

To encode any characters that are not part of the GSM character set into an SMS message, the entire SMS message needs to be encoded in 16-bit Unicode format.

This leaves you with the following limits for size of an SMS message.

A binary SMS message can contain 140 8-bit bytes of information.

A text message using the GSM character set can contain 160 7-bit characters. (160 7-bit characters can be compressed into 140 8-bit bytes as 160*7 = 140*8.)

A unicode text message can contain 70 16-bit characters. (Because 70*16 = 140*8)

Where UTF-8 enters the picture is that NowSMS defaults to assuming that when a message is submitted to it via HTTP, that UTF-8 is used. Basically, UTF-8 is frequently used for the encoding in web applications that need to support a wide variety of different character sets.

When you use the NowSMS web form to submit an SMS message, the web browser automatically encodes the text in UTF-8 format for submitting to NowSMS.

NowSMS then decides whether the message can be sent using the standard GSM character set, or if Unicode encoding is required.

When you submit messages to NowSMS through a direct URL, sometimes it is not convenient to use UTF-8 in your application.

So if you are submitting an SMS message to NowSMS, and the text of that message is encoded using a different character set, you need to tell NowSMS which character set you are using.

In the example above, I added the "&charset=iso-8859-6" to the URL to indicate that the text was encoded using the standard Arabic character set. You could also specify "&charset=big5" for traditional Chinese or "&charset=gb2312" for simplified Chinese.