[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
character set problem with sms_data_decode function
From: |
Jeremy Lainé |
Subject: |
character set problem with sms_data_decode function |
Date: |
Wed, 10 Jan 2007 10:45:53 +0100 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.1.3) |
Hello,
There seems to be a problem with the way the sms_data_decode function
(common/gsm-sms.c) detects the character set of an SMS. The first test
in this function goes like this:
-----
/* Unicode */
if ((dcs.type & 0x08) == 0x08) {
-----
This is incorrect, because the bit of the Data Coding Scheme byte that
is being tested does not always mean "UCS2". This bit can also be set
if you have a 7bit Message Waiting Indication with the indication bit
set to 1.
I have started working on a patch that corrects this problem:
https://svn.jerryweb.org/public/mkezx/trunk/packages/gnokii/patches/04_sms_decode.diff
However, I also noticed that the gn_sms_dcs contains both a byte value
and a union (called 'u') which breaks down the different properties
that can be contained in the DCS byte.
It seems to me that we should be doing something like:
- during the parsing of the SMS header, analyse the raw DCS byte and
fill the 'u' union appropriately
- in sms_data_decode, use the appropriate gn_dcs_alphabet_type member
of the 'u' union instead of the raw DCS byte to determine what
alphabet to use
Your thoughts?
Jeremy
--
http://www.jerryweb.org/ : JerryWeb.org
http://sailcut.sourceforge.net/ : Sailcut CAD
http://opensource.polytechnique.org/ : Polytechnique.org Free Software
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- character set problem with sms_data_decode function,
Jeremy Lainé <=