8 # This program tests that --restrict-file-names=ascii can be used to
9 # ensure that all high-valued bytes are escaped. The sample filename was
10 # chosen because in former versions of Wget, one could either choose not
11 # to escape any portion of the UTF-8 filename via
12 # --restrict-file-names=nocontrol (which would only be helpful if one
13 # was _on_ a UTF-8 system), or else Wget would escape _portions_ of
14 # characters, leaving irrelevant "latin1"-looking characters combined
15 # with percent-encoded "control" characters, instead of encoding all the
16 # bytes of an entire non-ASCII UTF-8 character.
18 ###############################################################################
20 # "gnosis" in UTF-8 greek.
21 my $gnosis = '%CE%B3%CE%BD%CF%89%CF%83%CE%B9%CF%82';
26 <title>Some Page Title</title>
36 # code, msg, headers, content
42 "Content-type" => "text/html",
48 my $cmdline = $WgetTest::WGETPATH . " --restrict-file-names=ascii "
49 . "http://localhost:{{port}}/${gnosis}.html";
51 my $expected_error_code = 0;
53 my %expected_downloaded_files = (
59 ###############################################################################
61 my $the_test = HTTPTest->new (name => "Test-restrict-ascii",
64 errcode => $expected_error_code,
65 output => \%expected_downloaded_files);
66 exit $the_test->run();