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: Mon, 22 Nov 2010 04:57:40 -0600	[thread overview]
Message-ID: <4CEA4CA4.4050604@gmail.com> (raw)
In-Reply-To: <9F3EABD6E3419B4C81F34EAABB4D4018813542B193@irsmsx501.ger.corp.intel.com>

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

Hi Guillaume,

>>> -	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.
> 
> Yes you are right. I did a bit-shifting error in my mask and don't see it during my test.
> It's 0xc and not 0x6 to use for the mask.
> 
> The issue that I've is effectively due to the fact that some SIMs use the '1111' Coding Bits Entry (it's the case for French Orange SIM card for example). For me having the upper bits set to '1' do not really changes the character set decoding (only diff is that UCS2 will not be possible in that case). It's the reason why I've simply add a mask in the decode_text function. Using the sms_dcs_decode function is probably better as the DCS of the SIM ToolKit is the same as the one used for SMS.
> 
> Do you want that I re-publish a patch using the sms_dcs_decode function?

Bitwise shifting with 0x0c would work.  However, to be safe we might
just be extra pedantic and check that the DCS the SIM sends to us is
actually valid.

Regards,
-Denis

  reply	other threads:[~2010-11-22 10:57 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
2010-11-18  8:54   ` Lucas, GuillaumeX
2010-11-22 10:57     ` Denis Kenzior [this message]
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=4CEA4CA4.4050604@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.