search for: iconv_wrapper

Displaying 1 result from an estimated 1 matches for "iconv_wrapper".

2010 Jul 22
0
Fwd: [PATCH hivex] non-ASCII characters in node names
...8(vk->name, len); + } else { + ret = windows_utf16_to_utf8(vk->name, len); + } + if (!ret) + errno = EILSEQ; return ret; } @@ -1250,58 +1248,70 @@ hivex_value_value (hive_h *h, hive_value_h value, } static char * -windows_utf16_to_utf8 (/* const */ char *input, size_t len) +iconv_wrapper (iconv_t ic, char *input, size_t len) { - iconv_t ic = iconv_open ("UTF-8", "UTF-16"); - if (ic == (iconv_t) -1) - return NULL; - - /* iconv(3) has an insane interface ... */ - - /* Mostly UTF-8 will be smaller, so this is a good initial guess. */ size_t outalloc = le...