tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: print encoded string on stdout

Am 12.01.2009 um Mo, 12. 01 2009, 21:06 schrieb Iain Hibbert:
I am given a data buffer (const, not nul terminated) claiming to contain an encoded text string and I know the language & encoding (likely "en" &
"UTF-8" but no guarantee) and I want to safely display this string on

I'm frankly lost in a maze of twisty manpages (and, although there was
some massive citrus update recently I've not caught up yet), probably I
need mbstowcs() and a wprintf() but I'm typically ignorant ASCII user.

How do I do this, is there any simple example I could look at?

Just printf it, and hope that the displaying terminal will do the work for you?

 - Hubert

Home | Main Index | Thread Index | Old Index