Displaying 3 results from an estimated 3 matches for "latin1_to_utf8".
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...+iconv_t *
+_hivex_get_iconv (hive_h *h, recode_type t)
+{
+ pthread_mutex_lock (&h->iconv_cache[t].mutex);
+ if (h->iconv_cache[t].handle == NULL) {
+ if (t == utf8_to_latin1)
+ h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8");
+ else if (t == latin1_to_utf8)
+ h->iconv_cache[t].handle = iconv_open ("UTF-8", "LATIN1");
+ else if (t == utf8_to_utf16le)
+ h->iconv_cache[t].handle = iconv_open ("UTF-16LE", "UTF-8");
+ else if (t == utf16le_to_utf8)
+ h->iconv_cache[t].handle = iconv_ope...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
...+iconv_t *
+_hivex_get_iconv (hive_h *h, recode_type t)
+{
+ glthread_lock_lock (&h->iconv_cache[t].mutex);
+ if (h->iconv_cache[t].handle == NULL) {
+ if (t == utf8_to_latin1)
+ h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8");
+ else if (t == latin1_to_utf8)
+ h->iconv_cache[t].handle = iconv_open ("UTF-8", "LATIN1");
+ else if (t == utf8_to_utf16le)
+ h->iconv_cache[t].handle = iconv_open ("UTF-16LE", "UTF-8");
+ else if (t == utf16le_to_utf8)
+ h->iconv_cache[t].handle = iconv_ope...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...hive_h *h, recode_type t)
> +{
> + pthread_mutex_lock (&h->iconv_cache[t].mutex);
> + if (h->iconv_cache[t].handle == NULL) {
> + if (t == utf8_to_latin1)
> + h->iconv_cache[t].handle = iconv_open ("LATIN1", "UTF-8");
> + else if (t == latin1_to_utf8)
> + h->iconv_cache[t].handle = iconv_open ("UTF-8", "LATIN1");
> + else if (t == utf8_to_utf16le)
> + h->iconv_cache[t].handle = iconv_open ("UTF-16LE", "UTF-8");
> + else if (t == utf16le_to_utf8)
> + h->iconv_ca...