tech-userlevel archive

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

print encoded string on stdout



Hi,

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
stdout.

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?

iain


Home | Main Index | Thread Index | Old Index