Page 1 of 1
sms and unicode
Posted: Sat Nov 19, 2005 10:09 am
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
Posted: Sat Nov 19, 2005 10:45 am
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
Posted: Sat Nov 19, 2005 10:56 am
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()
Posted: Sat Nov 19, 2005 12:05 pm
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