[PATCH] Parse SIM alpha fields (EF-SPN) according to TS 11.11.

Denis Kenzior denkenz at gmail.com
Tue Jul 7 12:37:01 PDT 2009


Hi,

> 2009/7/7 Denis Kenzior <denkenz at gmail.com>:
> > Your patch was a 'bit' inefficient, generating way too many function
> > calls.
>
> True, but in my defense only in the paths we are unlikely to hit.

Well we don't really know that, so lets keep the code efficient whenever 
possible ;)

>
> > I've pushed my own version called sim_string_to_utf8, which can be found
> > in util.c.
> >
> > Please review it for any issues..
>
> Looks correct to me, assuming there are no valid UCS2-BE characters
> with 0xff in first byte because the length check only checks first
> byte.  The 0x81, 0x82 cases now also accept UTF-16 characters that
> aren't UCS-2 (with upper byte 0xd8...0xdf).

Both valid points, I've pushed fixes to both.

Regards,
-Denis


More information about the ofono mailing list