[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.5

Convert a plain Unicode text to an SMS compatible

Asked by loggindevelop in Global System for Mobile Communications (GSM), Scripting Languages, WebApplications

Tags: unicode, sms, unicode to sms, gsm, utf-16, utf-8, ucs2, ucs-2, ucs 2, utf 16, ut

Hello,

I'm developing a PHP application for sending SMS via a Clickatell Gateway, but my problem is I don't know how to encode the Unicode text the user writes into an SMS compatible. I mean, for example: there's a text box where you can write in whatever language you want to with any symbols and so on... When you click send, as the GSM-7 encoding hasn't got all the characters of all the languages, my application has to convert that plain text into a UTF-16 encoding so the SMS which has to be sent will arrive and look as the original written text. Anyway, I'm not sure if the proper encoding is UTF-16. I just want that the text the user types arrives to the mobile phone without changing, being the same as the written one.

Clickatell offers an online converter, but doesn't give the script for free, so I cannot use it from my PHP app. However, I leave a screenshot of the converter and the script I'm currently using.

The final result has to look like 00480065006C006C006F002C0... => (Hello, this is just a test)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
<?
$user = "xxxxxx";
$password = "xxxxxx";
$api_id = "xxxxxxx";
$baseurl ="https://api.clickatell.com";
$text = urlencode("TEXT THE USER TYPES");
$to = "55555555";
$from = "logg.in";
$unicode = 1;
// auth call
$url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id";
// do auth call
$ret = file($url);
// split our response. return string is on first line of the data returned
$sess = split(":",$ret[0]);
if ($sess[0] == "OK") {
$sess_id = trim($sess[1]); // remove any whitespace
$url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&from=$from&text=$text&unicode=$unicode";
// do sendmsg call
$ret = file($url);
$send = split(":",$ret[0]);
if ($send[0] == "ID")
echo "success
message ID: ". $send[1];
else
echo "send message failed";
} else {
echo "Authentication failure: ". $ret[0];
exit();
}
?>
Attachments:
 
Clickatell's converter
Clickatell's converter
 
[+][-]06/13/09 01:18 AM, ID: 24618209Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/13/09 03:13 AM, ID: 24618520Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/13/09 03:24 AM, ID: 24618538Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/13/09 04:52 AM, ID: 24618785Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/13/09 05:48 AM, ID: 24618951Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/13/09 08:15 AM, ID: 24619508Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/13/09 10:34 AM, ID: 24620028Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/13/09 02:28 PM, ID: 24620851Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/14/09 03:01 AM, ID: 24622591Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/14/09 03:29 AM, ID: 24622700Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/14/09 04:27 AM, ID: 24622888Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/09 07:40 AM, ID: 24711835Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/09 08:38 AM, ID: 24712536Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/09 08:40 AM, ID: 24712569Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Global System for Mobile Communications (GSM), Scripting Languages, WebApplications
Tags: unicode, sms, unicode to sms, gsm, utf-16, utf-8, ucs2, ucs-2, ucs 2, utf 16, ut
Sign Up Now!
Solution Provided By: shellgrip
Participating Experts: 2
Solution Grade: A
 
[+][-]06/25/09 09:12 AM, ID: 24712944Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625