in reply to Re: Re: cgi email Japanese contents scripting problem
in thread cgi email Japanese contents scripting problem

No problem. First the obligatory point. If you value the security of your web site, it is much better to use CPAN modules like CGI.pm to handle your CGI needs, something like Mail::Sendmail to handle the mailing, and something like MIME::Lite to create a nice MIME packet.

Right now though, you're trying to get something to work and probably won't be willing to wade through all that. So as an interim workaround, I would suggest inserting into the part of the program that prints out the Header (The first group of print MAIL "....."; (up to print MAIL "\n\n", which ends the header) the following (not tested, as I don't know Japanese...)

print MAIL "Content-Transfer-Encoding: ISO-2022-JP\n"; print MAIL "Content-Type: text/plain\n";
But be careful with this! You are taking input that the user has input onto a webform and then blithely sending it out to an external program (usually sendmail). Someone who knows you were doing that could try sending a code to end the sendmail input followed by a command to do something nasty to your server.

If you use Super Search you should be able to get a lot of information about CGI security and see how to patch this up better. Or, for an easier way, davorg, one of our resident monks, and the London Perl Mongers are working on easy programs to allow you to set this kind of thing up without giving away all the security. Look for it here: nms.