perlとPHPで同じことをしてみました。
#!/usr/bin/perl read(STDIN,$buf,$ENV{'CONTENT_LENGTH'}); $str = ''; foreach $pair (split(/&/,$buf)) { ($key, $val) = split(/=/, $pair); $key =~ tr/+/ /; $key =~ s/%([0-9a-fA-F]{2})/pack('C', hex($1))/eg; $val =~ tr/+/ /; $val =~ s/%([0-9a-fA-F]{2})/pack('C', hex($1))/eg; $str .= " [$key] => $val\n"; } print <<__HTML__ Content-type:text/html <html> <head> <meta http-equiv="content-type" content="text/html; charset=EUC-JP"> <title>test</title> </head> <body> <pre>$str</pre> <form method="post"> <input name="vote_1.もんた" value="投票" type="submit"> </form> </body> </html> __HTML__
<pre> [vote_1.もんた] => 投票 </pre>
<html> <head> <meta http-equiv="content-type" content="text/html; charset=EUC-JP"> <title>test</title> </head> <body> <pre><?php print_r($HTTP_POST_VARS) ?></pre> <form method="post"> <input name="vote_1.もんた" value="投票" type="submit"> </form> </body> </html>
<pre>Array ( [vote_1_もんた] => 投票 ) </pre>
PHPでは、name="vote_1.もんた"でsubmitしたのに'vote_1_もんた'が入ってきます。