Hi Pavel,
sorry to be the party pooper, but I don't like the libosmocore patch for two reasons:
1) a popen to the locale command is really ugly. First of all, it will synchronously block the process issuing that command. Typical libosmocore-using processes are single-threaded and expect library calls to be non-blocking. Secondly, I really hate the idea of spawning other processes, executing other executables. It sounds lieke an ugly hack. Is there no way to get the information programmatically, e.g. by using localeconv(3) ?
2) the function "ucs2_to_utf8_decode" is cluttering the global namespace even further. Yes, it is in principle not a function related to gsm, but I'd still appreciate if it would start with osmo_ or gsm_ prefix in order to make sure we don't clash with applications or other libraries using the same symbol name.