Try this

$str = 'áéíóú ñ œ∑åΩ≈ç'
$utf8 = (pack('H*', strrev(chunk_split(strrev(bin2hex(utf8_decode($str))), 2, '00'))));
$msg = urlencode($utf8);

later just use coding=2 for sending the sms

...cgi-bin/sendsms?user=user&password=pass&coding=2&txt=$msg

This will send the $str in UTF8 the problem is that the total characters send will be twice the size of $str.

regards.

On Jan 14, 2008, at 10:18 AM, Joe Perry wrote:

Hi Davor and thanks for the response,

I have tried what you have explained but have so far failed to have much luck.

I am attempting to send the phrase ΗΕΛΛΟ. Through my hex conversions, the actual body of the message being sent through HTTP to the smsbox is %CE%97%CE%95%CE%9B%CE%9B%CE%9F.

The phone however is only displaying what appears to be |?|?|?|?|?.

Any idea what might be occuring here?

Thanks,

Davor Spasoski wrote:
Basically, you have two ways of sending Greek alphabet, either using the UTF-8 or by using Greek capital which are part of the default GSM encoding.
If you use the second method, which have the 160 characters per SMS
advantage over UTF-8, try setting alt-dcs=1 that will guarantee using the default GSM encoding. Also make sure you actually encode those characters
properly by using its appropriate hex code
(http://www.visualtron.com/bit_default_alphabet.htm ), not by just typing
those characters in Windows (UTF-8)

BTW, this works for sure, I tried this.

Davor Spasoski

-----Original Message-----
From: Joe Perry [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 1:51 PM
To: users@kannel.org
Subject: Kannel 1.4.1-2 Greek Character Set

Hi there,

Been reading up on this but still yet to find any fixes that has successfully worked for me.

I am posting my message (UTF-8) to the smsbox using HTTP, but once the message reaches the phone certain characters are converted to strange combinations of characters.

For example, I can send a plain english message perfectly and the phone will receive it as it should. However, once I start using greek characters which are inside the default GSM alphabet the message which is delivered to the phone becomes "corrupt" and appears not as it perhaps should.

Is there a fix that any of you know to help me with this problem, or can explain where I am going wrong?

Thanks



COSMOFON - Mobile Telecommunications Services - A.D. Skopje
_______________________________________________________________
This e-mail (including any attachments) is confidential and may be protected by legal privilege. If you are not the intended recipient, you should not copy it, re-transmit it, use it or disclose its contents, but should return it to the sender immediately and delete your copy from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. COSMOFON A.D. Skopje shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system.









Reply via email to