Tomohiro KUBOTA wrote:
> Please use nl_langinfo(CODESET) for encoding name of char* string,
> because the encoding of char* string depends on locale.
> On most GNU-based systems it is available.  You have to call
> setlocale() in advance.
>
> iconv_t ic = iconv_open("UTF-8",nl_langinfo(CODESET));

Right. And when you use GNU libc or GNU libiconv but your platform lacks
nl_langinfo(CODESET) (like for example FreeBSD 4), then you can use
the "" alias instead. It has the same meaning: the locale dependent char*
encoding:

iconv_t ic = iconv_open("UTF-8","");

Bruno


--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to