[PATCH] Support of UCS2 for SMS/USSD

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Pavel Baturko pabftk at gmail.com
Fri Feb 8 10:29:17 UTC 2013


Hi Harald,

> the locale setting is only for the current program.  And as indicated,
> at least so far, most libosmocore users are single-threaded, i.e. nobody
> would notice if the locale was different for a very short amount of
> time.  Furthermore, assuming that the code is not called all that often
> (i.e. only once at program startup) I wouldn't be worried about that so
> much.
I can add some kind of global var which will indicate UTF-8 support
and init it when app starting with code above (or other code if will
find better one). Then use it in case of SMS/USSD receving.

> I am not an expert in locale.h matters, but it would somehow be strange
> to me if you cannot determine utf-8 support without having to actually
> change the locale.  Is anyone on this list more familiar with it?
I asked some time ago, but there was no answer.. setlocale function
with NULL argument always returns "C" - Minimal "C" locale - if locale
was not changed before, with arguments rather than NULL - changes the
locale.

Thanks,
Pavel




More information about the baseband-devel mailing list