1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Fix Test-iri-forced-remote

* tests/Test-iri-forced-remote.px: Fix encodings
This commit is contained in:
Tim Rühsen 2015-12-20 21:32:06 +01:00
parent 59b920874d
commit b30500f0f4
2 changed files with 6 additions and 8 deletions

View File

@ -1537,9 +1537,9 @@ append_uri_pathel (const char *b, const char *e, bool escaped,
} }
static char * static char *
convert_fname (const char *fname) convert_fname (char *fname)
{ {
char *converted_fname = (char *)fname; char *converted_fname = fname;
#if HAVE_ICONV #if HAVE_ICONV
const char *from_encoding = opt.encoding_remote; const char *from_encoding = opt.encoding_remote;
const char *to_encoding = opt.locale; const char *to_encoding = opt.locale;

View File

@ -27,8 +27,6 @@ my $eacute_l1 = "\xE9";
my $eacute_u8 = "\xC3\xA9"; my $eacute_u8 = "\xC3\xA9";
my $eurosign_l15 = "\xA4"; my $eurosign_l15 = "\xA4";
my $eurosign_u8 = "\xE2\x82\xAC"; my $eurosign_u8 = "\xE2\x82\xAC";
my $currency_l1 = "\xA4";
my $currency_u8 = "\xC2\xA4";
my $pageindex = <<EOF; my $pageindex = <<EOF;
<html> <html>
@ -120,8 +118,8 @@ my %urls = (
code => "200", code => "200",
msg => "Ok", msg => "Ok",
headers => { headers => {
# wrong charset here, overridden by --remote-encoding=iso-8859-1 # wrong charset specified by meta tag in $pagefrancais, overridden by HTTP Content-Type
"Content-type" => "text/html; charset=UTF-8", "Content-type" => "text/html; charset=iso-8859-1",
}, },
content => $pagefrancais, content => $pagefrancais,
}, },
@ -151,7 +149,7 @@ my %urls = (
}, },
); );
my $cmdline = $WgetTest::WGETPATH . " --iri -e robots=on --trust-server-names --remote-encoding=iso-8859-1 -nH -r http://localhost:{{port}}/"; my $cmdline = $WgetTest::WGETPATH . " --iri -e robots=on --trust-server-names --local-encoding=utf-8 -nH -r http://localhost:{{port}}/";
my $expected_error_code = 0; my $expected_error_code = 0;
@ -168,7 +166,7 @@ my %expected_downloaded_files = (
"p2_${eacute_u8}${eacute_u8}n.html" => { "p2_${eacute_u8}${eacute_u8}n.html" => {
content => $pageeen, content => $pageeen,
}, },
"p3_${currency_u8}${currency_u8}${currency_u8}.html" => { "p3_${eurosign_u8}${eurosign_u8}${eurosign_u8}.html" => {
content => $pageeuro, content => $pageeuro,
}, },
); );