All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] stkutil: mask the DCS value to keep only the intersting bits
Date: Wed, 17 Nov 2010 08:13:49 -0600	[thread overview]
Message-ID: <4CE3E31D.9050800@gmail.com> (raw)
In-Reply-To: <9F3EABD6E3419B4C81F34EAABB4D401881353DCF1D@irsmsx501.ger.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

Hi Guillaume,

On 11/15/2010 08:17 AM, Lucas, GuillaumeX wrote:
> From: Guillaume Lucas <guillaumex.lucas@intel.com>
> 
> For SIM tool kit only the bits 2 and 3 are interesting
> for the DCS value. The others ones sould be masked. The
> masking is necessary because some SIM car set the
> upper bits to 1.
> ---
>  src/stkutil.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/stkutil.c b/src/stkutil.c
> index cdd66bd..a54dd02 100644
> --- a/src/stkutil.c
> +++ b/src/stkutil.c
> @@ -78,7 +78,7 @@ static char *decode_text(unsigned char dcs, int len, const unsigned char *data)
>  {
>  	char *utf8;
>  
> -	switch (dcs) {
> +	switch (dcs & 0x06) {

Do you mean to bitwise and with 0xc here?  Otherwise you break the UCS2
case.  Also do any SIMs use the '1111' Coding Bits Entry entry from
23.038 Section 4?  If so, then we need to use sms_dcs_decode to retrieve
the character set.

>  	case 0x00:
>  	{
>  		long written;

Regards,
-Denis

  reply	other threads:[~2010-11-17 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 14:17 [PATCH] stkutil: mask the DCS value to keep only the intersting bits Lucas, GuillaumeX
2010-11-17 14:13 ` Denis Kenzior [this message]
2010-11-18  8:54   ` Lucas, GuillaumeX
2010-11-22 10:57     ` Denis Kenzior
2010-11-23 15:59       ` Lucas, GuillaumeX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CE3E31D.9050800@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.