sms and unicode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rtm
Forum Newbie
Posts: 1
Joined: Sat Nov 19, 2005 10:02 am
Contact:

sms and unicode

Post by rtm »

hi
i am developing my website for sending sms.
i need to have the script which can convert the text ( non english) to unicode
as it is required by the sms gateways to send unicode data when message is
non english.any bodyc an give me this script please???
its urgent please becuase without it my website is incomplete

regards,
rtm
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

you're going to want to move this to the job posting forum because I doubt if anyone has such a script they're going to give it over for fre, unless a free script exists. in which case you can go google it:-D
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I looked in the PHP manual and found this:

http://uk.php.net/unicode

But it doesn't seem to convert from other formats to unicode and it's only in PHP5 CVS.

I'd perhaps have a search at hotscripts. Googling didn't return much when I searched.

Like charles said... you may be pushed to get someone to write this for you free, I can assume it's not simple to do.

EDIT | Unless you're looking to just encode in UTF-8... utf8_encode()
yum-jelly
Forum Commoner
Posts: 98
Joined: Sat Oct 29, 2005 9:16 pm

Post by yum-jelly »

In Perl you could just use pack ( 'U0C*', var); but the modifier * U * is not included in PHP. You will have to use the mb_ string functions and go through each character using ord() & chr() to convert the string! There may be easier way but that's how I know how to do it! There is also a CONVERT CHARACTER CLASS that might give you some idea's. I have used it before and it works good enough to not reinvent the wheel, which in my case * being lazy * is nice!


yj
Post Reply