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
sms and unicode
Moderator: General Moderators
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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()
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()
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
yj