lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV lynx eats spaces in a link


From: Klaus Weide
Subject: Re: LYNX-DEV lynx eats spaces in a link
Date: Thu, 20 Mar 1997 19:43:10 -0600 (CST)

On Thu, 20 Mar 1997, Larry W. Virden, x2487 wrote:

> Anyone know of a command line program that can be given an argument of a link
> and which returns an encoded one? 

You didn't say how long...  Try this:

perl -pe 's/([ -),:;<=>?\x5b-\x5e`\x7b-\xff])/"%".unpack("H2",$1)/eg'

It might be slightly easier to read the relevant RFC and just remember
which characters are reserved and which are their ASCII values.  That has
the additional advantage that you can do the right thing depending on URL
scheme and the part of the URL where the character occurs, which the above
command line cannot do.

  Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]