diff --git a/src/main.c b/src/main.c index 8b9c1105..d7e2fbb9 100644 --- a/src/main.c +++ b/src/main.c @@ -1207,9 +1207,10 @@ WARNING: Can't reopen standard output in binary mode;\n\ * retrieve_url may modify it in some circumstances, * currently. */ struct iri *iri = iri_new (); - struct url *url_parsed = url_parse (*t, &url_err, iri, true); + struct url *url_parsed; set_uri_encoding (iri, opt.locale, true); + url_parsed = url_parse (*t, &url_err, iri, true); if (!url_parsed) { diff --git a/tests/Test-ftp-iri.px b/tests/Test-ftp-iri.px index 78e2622c..c7119482 100755 --- a/tests/Test-ftp-iri.px +++ b/tests/Test-ftp-iri.px @@ -25,7 +25,7 @@ my %urls = ( }, ); -my $cmdline = $WgetTest::WGETPATH . " --locale=iso-8859-1 -S ftp://localhost:{{port}}/fran${ccedilla_l1}ais.txt"; +my $cmdline = $WgetTest::WGETPATH . " --debug --locale=iso-8859-1 -S ftp://localhost:{{port}}/fran${ccedilla_l1}ais.txt"; my $expected_error_code = 0;