Hi Pavel,
On Fri, Feb 08, 2013 at 02:29:17PM +0400, Pavel Baturko wrote:
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.
This sounds reasonable. Please make the global variable static and hide
it to the caller. So only on the first call to the function it will do
the setlocale() trick, then store the result in a variable. All further
calls to the function will then retunr the variable instead of
setlocale() and friends.
--
- Harald Welte <laforge(a)gnumonks.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)