+ /* When `i->uri_encoding' == "UTF-8" there is nothing to convert. But we must
+ test for non-ASCII symbols for correct hostname processing in `idn_encode'
+ function. */
+ if (!strcmp (iri->uri_encoding, "UTF-8"))
+ {
+ const char *p = str;
+ for (p = str; *p; p++)
+ if (*p < 0)
+ {
+ *new = strdup (str);
+ return true;
+ }
+ return false;
+ }
+
+ cd = iconv_open ("UTF-8", iri->uri_encoding);