On Tuesday 18 May 2004 3:57 pm, James Simmons wrote:
> What is the quickest way to convert a char* string into a unicode or
> UTF string?

One easy way is to use the iconv calls from glibc. On most GNU-based 
systems you can read about it with 'man 3 iconv', or take a look in the 
glibc manual online at:
<http://www.gnu.org/software/libc/manual/html_node/index.html>, 
particularly:
<http://www.gnu.org/software/libc/manual/html_node/Generic-Conversion-Interface.html>, 
and
<http://www.gnu.org/software/libc/manual/html_node/iconv-Examples.html>

Basically, you just:

iconv_t ic = iconv_open("UTF-8","ISO-8859-1"); // for example
// use iconv(ic,...) to do your conversions
iconv_close(ic);

-- 
Wesley J. Landaker <[EMAIL PROTECTED]>
OpenPGP FP: 4135 2A3B 4726 ACC5 9094  0097 F0A9 8A4C 4CD6 E3D2

Attachment: pgp0Ex7ffBRaJ.pgp
Description: signature

Reply via email to