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

Andrzej Zaborowski andrew.zaborowski at intel.com
Tue Jul 7 06:04:27 PDT 2009


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.

> 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).

Regards


More information about the ofono mailing list