goto error;
}
- if (opt.enable_iri)
+ if (opt.enable_iri && get_utf8_encode ())
{
+ const char *new;
+ bool utf8_encode;
url_unescape ((char *) url);
- url = locale_to_utf8(url);
+ utf8_encode = remote_to_utf8 (url, &new);
+ set_utf8_encode (utf8_encode);
+ if (utf8_encode)
+ url = new;
}
url_encoded = reencode_escapes (url);
if (opt.enable_iri)
{
- char *new = idn_encode (u->host);
+ char *new = idn_encode (u->host, get_utf8_encode ());
if (new)
{
xfree (u->host);