outcharset = encoding;
# ifdef _LIBC
- /* We always want to use transliteration. */
- outcharset = norm_add_slashes (outcharset, "TRANSLIT");
- charset = norm_add_slashes (charset, "");
- int r = __gconv_open (outcharset, charset, &convd->conv,
- GCONV_AVOID_NOCONV);
+
+ struct gconv_spec conv_spec
+ = { .fromcode = norm_add_slashes (charset, ""),
+ .tocode = norm_add_slashes (outcharset, ""),
+ /* We always want to use transliteration. */
+ .translit = true,
+ .ignore = false
+ };
+ int r = __gconv_open (&conv_spec, &convd->conv,
+ GCONV_AVOID_NOCONV);
if (__builtin_expect (r != __GCONV_OK, 0))
{
/* If the output encoding is the same there is