[PATCH] Decoding UCS2 USSD
Pavel Baturko
pabftk at gmail.com
Wed Sep 19 23:49:29 CEST 2012
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.
~Pavel
On Wed, Sep 19, 2012 at 2:12 AM, Peter Stuge <peter at stuge.se> wrote:
> Holger Hans Peter Freyther wrote:
> > 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?
>
> I'd suggest http://www.lemoda.net/c/ucs2-to-utf8/ and simply output
> UTF-8.
>
> Maybe output an error if setlocal(LC_CTYPE,NULL) does not report that
> a UTF-8 locale is being used.
>
>
> //Peter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20120919/e9868da9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ussd-ucs2.patch
Type: application/octet-stream
Size: 11255 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20120919/e9868da9/attachment.obj>
More information about the baseband-devel
mailing list