Re: converting strings from utf8

2008-11-05 Thread Tim Kientzle
Maksim Yevmenkin wrote: can i use wcstombs(3) to convert a string presented in utf8 into current locale? basically i'm looking for something like iconv from ports but included into base system. This isn't as easy as it should be, unfortunately. First, UTF-8 is itself a multibyte encoding, so

converting strings from utf8

2008-11-04 Thread Maksim Yevmenkin
Hello, can i use wcstombs(3) to convert a string presented in utf8 into current locale? basically i'm looking for something like iconv from ports but included into base system. in other words, would something like this work? char *locale, dst[256]; size_t len; locale = setlocale(LC_CTYPE, );