Re: [PATCH] alt-charset handling in HTTP SMSC module

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi Stipe,

as far as I know, we handled coding=2 as binary data and never de- or encoded this? why do you try to do it now?
IMHO you have to check for coding == DC_7BIT and if it is not the case send it as is without any recoding.

Thanks,
Alexander Malysh


Am 09.03.2011 um 00:45 schrieb Stipe Tolj:

> Hi all,
> 
> here is small issue that I resolved some days ago for a client that uses the
> HTTP SMSC towards an own HTTP API (via the generic type).
> 
> In the abstractive layer call httpsmsc_send() we handle the conversion to an
> alternative character encoding, based on the value of 'alt-charset' of the
> corresponding 'group = smsc' context. So far so good.
> 
> The point is: the function ASSUMES that all MTs have our internal encoding
> (UTF-8) in the msg->sms.msgdata payload. Which is NOT the case if the smsbox
> connection passed a coding=2, hence we have msg->sms.coding = 2 indicating that
> the msgdata is UCS-2 and NOT UTF-8. That's why we need to handle both cases
> here. The patch does this, and also ensures that the msg->sms.coding is also
> reset to DC_UNDEF to ensure that any specific API functions don't indicate a
> "wrong assumptive" encoding.
> 
> Please review and vote for commitment, should be pretty obvious.
> 
> Stipe
> 
> -- 
> -------------------------------------------------------------------
> Kölner Landstrasse 419
> 40589 Düsseldorf, NRW, Germany
> 
> tolj.org system architecture      Kannel Software Foundation (KSF)
> http://www.tolj.org/              http://www.kannel.org/
> 
> mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
> -------------------------------------------------------------------
> <smsc_http-alt-charset.diff>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.