On 28 Aug 2000, at 22:41, L.D. Best wrote:

> Glenn,
> 
> That %20 white space has *always* been inserted into every string on
> ever search site I've ever visited with netTamer or Arachne.  
> 
> The *web*page* CGI script does that so terms are clearly separated.  

If theres a spare %20 appended or prepended to the URL, then it is 
assumed to be Arachne's fault. But sometimes someone puts the 
extra space at the end, or goes crazy with whitespace...

print "Location: http://somewhere/something.html \n\n";

Notice the space between html and \n? (This is from a CGI perl 
script)

> If you use the plus sign it will either be ignored and after+sunset will
> be searched as "aftersunset" or it will be searched as "after+sunset"
> and the results will be the same.  "No Matches Found!"

The BROWSER changes spaces to plusses, and (user-entered) 
plusses to %2B. (FWIW "%2B" will become "%252B" on the 
commandline)

The CGI script is responsible for changing the symbols to the 
correct meaning. In my scripts, %20 will be converted correctly, as 
will the plus.

All this because you are meant to be sending filenames across the 
internet, and spaces may be interpretted wrongly. So came space 
to plus. Then they need to encode plus. Bring in percent. But the 
percent works like the equals in MIME....

Perl snippet:

    $equalto =~ tr/+/ /;
    $equalto =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;


Say you wanted flowers, preferring blue, in most search engines, 
search "blue +flowers". This would be converted to something like 
"http://www.s.com/search.pl?search=blue%20%2Bflowers" (made 
up!) Or "http://www.s.com/search.pl?search=blue+%2Bflowers" by 
some other browsers. Either one should work.


Reply via email to