#!/usr/bin/perl # $Id: testescapes,v 1.1 1994/07/08 08:08:14 fielding Exp $ #----------------------------------------------------------------- # testescapes: A simple program for testing WWW URL escaping and unescaping. # # 07 Jul 1994 (RTF): Initial Version # # Created by Roy Fielding to test the libwww-perl system #----------------------------------------------------------------- if ($libloc = $ENV{'LIBWWW_PERL'}) { unshift(@INC, $libloc); } require "wwwurl.pl"; while (<>) { chop; if ($_) { #$escpd = &wwwurl'escape($_, '[\x00-\x20"#%/;<>?\x7F-\xFF]'); #print $_,' = ', $escpd,' = ', &wwwurl'unescape($escpd), "\n"; print &wwwurl'unescape($_), "\n"; } } exit(0);