Help for this page

Select Code to Download


  1. or download this
      s/(.)/ord($1)>127 or ord($1)<=32 ? sprintf("%%%02x",ord($1)) : $1/se
    +;
    
  2. or download this
    for my $ofs (0..length($str)-1) {
      my $c=substr($str,$ofs,1);
      substr($str,$ofs,1)=sprintf("%%%02x",ord($c)) if ord($c)>127 or ord(
    +$c)<=32;
    }