How to get libiconv on FreeBSD 10 convert utf-8 -> wchar_t ?

Tijl Coosemans tijl at FreeBSD.org
Thu Oct 1 19:22:03 UTC 2015


On Thu, 1 Oct 2015 01:37:52 -0700 (MST) kora via freebsd-questions <freebsd-questions at freebsd.org> wrote:
> I'm new working / developing on FreeBSD.
> I tried to port my software written in C++ to FreeBSD 10.2.
> I have a "utf-8 -> wchar_t"- converting problem using the "libiconv"
> converter  library in my C code.
> 
> I have heard about a problem of that kind pending since FreeBDS 10.
> Has anybody a hint or solution for that problem ?

WCHAR_T conversion is not supported by FreeBSD's implementation of
iconv so you must install GNU libiconv (converters/libiconv port).
Then compile your code with "-I/usr/local/include" to use
/usr/local/include/iconv.h instead of /usr/include/iconv.h and link
your code with "-L/usr/local/lib -liconv".


More information about the freebsd-questions mailing list