Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: cgi email Japanese contents scripting problem

by Hanamaki (Chaplain)
on Jan 02, 2002 at 01:36 UTC ( #135556=note: print w/ replies, xml ) Need Help??


in reply to cgi email Japanese contents scripting problem

Yes, as said above sending email in Japanese usually means sending the the text (7-bit) jis-encoded.

(1) Before you can do this you need to find out it which encoding your programm receives the data.This could be jis, shift-jis, euc-jp or Unicode. You can find out the encoding with the Jcode module from CPAN:

use Jcode; my $encoding = getcode($content);

(2) After you have found out the encoding you want to convert your string to 7 bit jis.
my $mailtext = Jcode::convert($content, "jis", $encoding);


Appart from that, the Jcode module also supplies some basic MIME handling functions.
Hope that helps,

Hanamaki


Comment on Re: cgi email Japanese contents scripting problem
Select or Download Code
Replies are listed 'Best First'.
Re: Re: cgi email Japanese contents scripting problem
by stonemen (Initiate) on Jan 02, 2002 at 07:32 UTC

    Thanks for all the help.

    Hanamaki san,

    In my script, is the format for your coding:

    PRINT MAIL "my $mailtext = Jcode::convert($content, "jis", $encoding)";

    Thanks,

    Jim

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://135556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2015-07-28 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (259 votes), past polls