figure it out, need to convert character code from utf-16be back to whatever
default code then use it.
Thank you for the help.

roger

seikath wrote:
> 
> I tried twice to explain
> I cant find other ways to explain more.
> may be this will help you:
> 
> $sms1251=preg_match("/UTF/i",$GLOBALS["_REQUEST"]["charset"]) ?
> pg_escape_string(iconv($GLOBALS["_REQUEST"]["charset"],
> "Windows-1251",$GLOBALS["_REQUEST"]["message"])) :
> pg_escape_string($GLOBALS["_REQUEST"]["message"]);
> its PHP code, GLOBALS array is the kannel reuquest.
> 
> I convert to Cyrilic , because I am Bulgarian and used to code at kannel
> box binded to Bulgarian SMSC :)
> so change the "Windows-1251" to whatever you want.
> 
> 
> patrick meye wrote:
>> Hi Seikath,
>> 
>> That's the same probleme like mine,all you say is exatly what i've
>> done,but i don't know how to know what charset kannel is doing
>> request.Can help me about,just how to know what charset kannel request
>> please.I think that'll help me.
>> 
>> Thank you in advance!
>> 
>>> Date: Fri, 16 Oct 2009 12:21:59 +0300
>>> From: [email protected]
>>> CC: [email protected]
>>> Subject: Re: Character code conversion
>>>
>>> What i mean is :
>>> 1. set mo-recode=true
>>> 2. restart the smsc.
>>> 3. in the get-url add the charset code so you will know in what
>> charset kannel is doing the request.
>>> example:
>>> post-url =
>>>
>> "http://localhost/smpp.php?from=%p&message=%a&received=%T&coding=%c&charset=%C&to=%P&smsc_id=%i&kannel_id=%I&udh=%u&dcs=%m&mwi=%M&sms-service=%n&binmess=%b&billinfo=%B&account_id=%f";
>>> 4. iconv ..
>>>
>>>
>>> Karan Zaveri wrote:
>>> > Hi Seikath,
>>> >
>>> > Thanks for responding but when you say "convert the Kannel request
>> from the
>>> > reported kannel character
>>> > set" do you mean the value set in the alt-character variable? I
>> tried the
>>> > above and what happens is
>>> > all characters except the $$ sign shows a weird character and
>> doesn't show
>>> > up correctly.
>>> >
>>> > Thanks for your help.
>>> >
>>> > Karan
>>> >
>>> > -----Original Message-----
>>> > From: [email protected] [mailto:[email protected]] On
>> Behalf
>>> > Of seikath
>>> > Sent: Friday, October 16, 2009 3:38 AM
>>> > Cc: [email protected]
>>> > Subject: Re: Character code conversion
>>> >
>>> > at the config, set mo-recode=true
>>> > and then use iconv to convert the kannel request from the reported
>> by kannel
>>> > charset to the desired one IF the reported charset is not UTF*
>>> >
>>> > rcong wrote:
>>> >> Hi,
>>> >>
>>> >> Can someone please tell me that how do I convert kannel received
>> text into
>>> >> UTC-8 code? I tried to use ICONV without success. Currently, my
>>> geturl
>>> >> receives something like:
>>> >>
>>> >
>> O%11e%AFef%00+%00y%00o%00u%00r%00+%00m%00e%00s%00s%00a%00g%00e%00+%00r%00e%0
>>> > 0c%00e%00i%00v%00e%00d%00.%00+%7BI_%85.
>>> >> Is this unicode?
>>> >>
>>> >> Thanks,
>>> >> Roger
>>> >
>>> > No virus found in this incoming message.
>>> > Checked by AVG - www.avg.com
>>> > Version: 8.5.421 / Virus Database: 270.14.18/2437 - Release Date:
>> 10/15/09
>>> > 03:57:00
>>> >
>>> >
>>> >
>>> >
>>>
>> 
>> ------------------------------------------------------------------------
>> Un avatar à votre image ? Créez votre mini-moi !
>> <http://www.ilovemessenger.fr/minimize-me>
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Character-code-conversion-tp25917969p25934281.html
Sent from the Kannel - User mailing list archive at Nabble.com.


Reply via email to