Q:
Hi Peter,
How to I change the email portion (see below) of a perl cgi script to
accept a language other than English? In my case, I want it to send
Japanese. The way it is now, it scrambles the Japanese text, and it is
unreadable. I know that iso-2022-jp has to go in there someware but I'm
not sure where. Can you help me?
Other than this issue, the script works perfectly!
Here is the script:
# Open The Mail Program
open(MAIL,"|$mailprog -t");
print MAIL "To: $FORM{'tomail'}\n";
>print MAIL "From: $FORM{'frommail'} ($FORM{'fromname'})\n";
print MAIL "Subject: $FORM{'subject'}\n\n";
print MAIL "japanese $FORM{'toname'}!\n\n";
print MAIL $FORM{'message'};
print MAIL "\n\n";
print MAIL "japanese\n\n";
print MAIL "$FORM{'fromname'}\n\n";
close (MAIL);
A:
I have never done that, but according to the MIM standard I think what you
need is
print MAIL "Content-Type: text/plain; charset=iso-2022-jp\n";
somewhere before printing the subject line.
Regards,
Peter
Q:
Hello Peter,
I have tried exactly as you suggested but it doesn't work.
Do you happen to know anyone or any group who I might contact that would
have a answer to my question? I'm thinking of a group or person that has
any kind for foreign language scripting abiltity, experience and the like.
Thanks for your time.
*NAME-DELETED*
A:
Sorry, I do not know. I used this for Hungarian encoding, and it worked.
Altough it was not really mail, but rather HTML page downloaded from CGI
program. I have never had any experience with any non-lating character
language (though I can read Russian using my eyes).
Regards,
Peter
[ back to toc ]