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

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization tolj.org system architecture
Message-ID <[email protected]>
Am 09.03.2011 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.

committed to svn trunk:

2011-03-11  Stipe Tolj  <stolj at kannel.org>
    * gw/smsc/smsc_http.c: ensure we handle 'alt-charset' correctly, in case
      we get DC_UCS2 coding in the payload.
      [Message-Id: <[email protected]>]

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
-------------------------------------------------------------------
smime.p7s (application/pkcs7-signature, 5.8 KB) - not displayed
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.