X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq9.pod;h=d1bd593dfe7690c16f2a977b086d5e302a7eb48b;hb=aaa68c4a88ea4a62f62819baf4cacc0ca679c5fa;hp=16a803c997c2f709dc0144d3d229fbacdfd55cef;hpb=c47ff5f1a1ef5d0daccf1724400a446cd8e93573;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index 16a803c..d1bd593 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -215,7 +215,8 @@ Here's an example of decoding: $string =~ s/%([a-fA-F0-9]{2})/chr(hex($1))/ge; Encoding is a bit harder, because you can't just blindly change -all the non-alphanumunder character (C<\W>) into their hex escapes. +all characters that are not letters, digits or underscores (C<\W>) +into their hex escapes. It's important that characters with special meaning like C and C I be translated. Probably the easiest way to get this right is to avoid reinventing the wheel and just use the URI::Escape module,