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.<div><br></div><div>~Pavel<br><br>

<div class="gmail_quote">On Wed, Sep 19, 2012 at 2:12 AM, Peter Stuge <span dir="ltr"><<a href="mailto:peter@stuge.se" target="_blank">peter@stuge.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">Holger Hans Peter Freyther wrote:<br>
> I think a library should not call setlocale as it will impact the<br>
> entire application. I think our only other realistic option is to<br>
> use iconv (and stub it out for osmocomBB). Do you think you could<br>
> try to create such a patch?<br>
<br>
</div>I'd suggest <a href="http://www.lemoda.net/c/ucs2-to-utf8/" target="_blank">http://www.lemoda.net/c/ucs2-to-utf8/</a> and simply output<br>
UTF-8.<br>
<br>
Maybe output an error if setlocal(LC_CTYPE,NULL) does not report that<br>
a UTF-8 locale is being used.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
//Peter<br>
<br>
</font></span></blockquote></div><br></div>