Re: 404 errors and html file names with "&" and "+" in them
Hi Steve!
On Fri, 23 Feb 2001, Steve Rudd wrote:
> The actual file name is:
> f-10com-Hus&Wifes.htm
>
> Are there certain characters that one should avoid in file names?
In general you should avoid everything but A-Za-z0-9 and '.'.
All other characters have to be replaced in urls with %<hex ascii code>.
Space may be replaced by '+'.
You may use something like this in perl code:
$url =~ s/([^A-Za-z0-9 ])/ '%' . unpack("H2", $1) /gex;
$url =~ s/ /+/g;
Hmm. I also replace the dot, *goingtofixthis*.
HTH,
yours,
peter
--
PGP signed and encrypted | .''`. ** Debian GNU/Linux **
messages preferred. | : :' : By professionals,
| `. `' for professionals
http://www.palfrader.org/ | `- http://www.debian.org/
Reply to: