Solved

How to send a message including french characters in clickatell's http api ?

Posted on 2010-11-25
4
669 Views
Last Modified: 2012-05-10
Hi, I think some of you have experience working with Clickatell. Today my problem is: when I send a message through their http api using french or spanish characters, they don't show in the phone.

I'm using this -guide-:
http://support.clickatell.com/faq.php?mode=view_entry&kbid=121&kbcat=26

I already tested it with several phones and they all show the same: " a va! mon l ve mi ni a?"
It should be "ça va! mon élève mi niña?" (or something pretty similar)

Thanks for your help!
0
Comment
Question by:blueshaolin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Expert Comment

by:Vimal DM
ID: 34218551
Hai,

Try using the following things on page and in your code

1) UTF 8
2) htmlentities functions
3) Added a parameter to the XML Encode plugin: protect_entities="yes" which will prevent the the plugin from converting '&' to '&' in existing …


And try using the "PHPMAILER" concept for sending mails,which will not send spams and things
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 34222725
See if you can live with this...
<?php // RAY_normalize_letters.php
error_reporting(E_ALL);


// DEMONSTRATE HOW TO TRANSLATE SOME CHARACTERS INTO ENGLISH-PRINTABLE REPRESENTATIONS


// USE CASE
echo mungString('Françoise');
echo mungString('ßeta');
echo mungString('ENCYCLOPÆDIA');
echo "<br/>";
echo mungString('ça va! mon élève mi niña?');


function mungString($str)
{
    // OUR REPLACEMENT ARRAY (MAY WANT SOME CHANGES HERE)
    static
    $normal
    = array
    ( 'Š'=>'S'
    , 'š'=>'s'
    , 'Ð'=>'Dj'
    , 'Ž'=>'Z'
    , 'ž'=>'z'
    , 'À'=>'A'
    , 'Á'=>'A'
    , 'Â'=>'A'
    , 'Ã'=>'A'
    , 'Ä'=>'A'
    , 'Å'=>'A'
    , 'Æ'=>'E'
    , 'Ç'=>'C'
    , 'È'=>'E'
    , 'É'=>'E'
    , 'Ê'=>'E'
    , 'Ë'=>'E'
    , 'Ì'=>'I'
    , 'Í'=>'I'
    , 'Î'=>'I'
    , 'Ï'=>'I'
    , 'Ñ'=>'N'
    , 'Ò'=>'O'
    , 'Ó'=>'O'
    , 'Ô'=>'O'
    , 'Õ'=>'O'
    , 'Ö'=>'O'
    , 'Ø'=>'O'
    , 'Ù'=>'U'
    , 'Ú'=>'U'
    , 'Û'=>'U'
    , 'Ü'=>'U'
    , 'Ý'=>'Y'
    , 'Þ'=>'B'
    , 'ß'=>'Ss'
    , 'à'=>'a'
    , 'á'=>'a'
    , 'â'=>'a'
    , 'ã'=>'a'
    , 'ä'=>'a'
    , 'å'=>'a'
    , 'æ'=>'e'
    , 'ç'=>'c'
    , 'è'=>'e'
    , 'é'=>'e'
    , 'ê'=>'e'
    , 'ë'=>'e'
    , 'ì'=>'i'
    , 'í'=>'i'
    , 'î'=>'i'
    , 'ï'=>'i'
    , 'ð'=>'o'
    , 'ñ'=>'n'
    , 'ò'=>'o'
    , 'ó'=>'o'
    , 'ô'=>'o'
    , 'õ'=>'o'
    , 'ö'=>'o'
    , 'ø'=>'o'
    , 'ù'=>'u'
    , 'ú'=>'u'
    , 'û'=>'u'
    , 'ý'=>'y'
    , 'ý'=>'y'
    , 'þ'=>'b'
    , 'ÿ'=>'y'
    , 'ƒ'=>'f'
    )
    ;
    return strtr($str, $normal);
}

Open in new window

0
 

Author Closing Comment

by:blueshaolin
ID: 34248211
It was a great idea, I just modified to suit my needs, thanks!
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 34248361
Great!  Thanks for the points, ~Ray
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to build a web site 17 54
xml with php question 5 35
PHP URL Parameter to simple URL for single folder 5 14
PHP substring 2 7
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question