Thanks for advises! New version: if received text in UCS2, convert it to UTF-8, then check if console supports UTF-8, if yes - print message in vty as usual, if not - print message in hex.
Holger Hans Peter Freyther wrote:I'd suggest http://www.lemoda.net/c/ucs2-to-utf8/ and simply output
> I think a library should not call setlocale as it will impact the
> entire application. I think our only other realistic option is to
> use iconv (and stub it out for osmocomBB). Do you think you could
> try to create such a patch?
UTF-8.
Maybe output an error if setlocal(LC_CTYPE,NULL) does not report that
a UTF-8 locale is being used.
//Peter