[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BUG REPORT: failed with Chinese charaters (I've fixed it)
From: |
Pawel Kot |
Subject: |
Re: BUG REPORT: failed with Chinese charaters (I've fixed it) |
Date: |
Sun, 22 Oct 2006 20:16:21 +0200 |
Hi,
Please try the following patch. I am assuming you use nk6510 driver.
It's against CVS. It works for me and I hope it will work for you as
well.
Index: common/gsm-sms.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/gsm-sms.c,v
retrieving revision 1.153
diff -u -r1.153 gsm-sms.c
--- common/gsm-sms.c 15 Oct 2006 20:46:58 -0000 1.153
+++ common/gsm-sms.c 22 Oct 2006 18:13:51 -0000
@@ -687,9 +687,9 @@
size = rawsms->length - sms->udh.length;
sms_data_decode(rawsms->user_data + sms->udh.length,
/* Skip the UDH */
(unsigned char
*)&sms->user_data[0].u.text, /* With a plain text message we have only
1 part */
- rawsms->length,
/* Length of the decoded text */
- size,
/* Length of the encoded text (in full octets) without UDH */
- sms->udh.length,
/* To skip the certain number of bits when unpacking 7bit message
*/
+ rawsms->length,
/* Length of the decoded text */
+ rawsms->user_data_length,
/* Length of the encoded text (in full octets) without UDH */
+ sms->udh.length,
/* To skip the certain number of bits when unpacking 7bit message
*/
sms->dcs);
break;
}
Index: common/phones/nk6510.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/phones/nk6510.c,v
retrieving revision 1.220
diff -u -r1.220 nk6510.c
--- common/phones/nk6510.c 15 Oct 2006 18:41:02 -0000 1.220
+++ common/phones/nk6510.c 22 Oct 2006 18:13:57 -0000
@@ -816,6 +816,7 @@
dprintf("block[2]: %02x\n", block[2]);
dprintf("block[3]: %02x\n", block[3]);
data->raw_sms->length = block[3];
+ data->raw_sms->user_data_length = block[2];
memcpy(data->raw_sms->user_data, block
+ 4, block[2]);
}
break;
--
Pawel Kot