Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] perl, cgi, and moji-baki



Erin D. Hughes wrote:

>Thanks Edmund, 
>
>I did not realize that I thought ISO-2022-JP was Shift-Jis. I guess that is why it does not come out on a Mac. 
>May I use Jcode to convert to this format as well?
>  
>
Yes, Jcode will convert to ISO-2022-JP for you, which should work fine 
for the body of the e-mail.

If the subject of your e-mail may also contain Japanese, there's a 
little bit of extra craziness there as well which you may want to read 
up on.

Edmund

>-----Original Message-----
>From: Edmund Edgar [mailto:lists@example.com]
>Sent: Wednesday, January 26, 2005 11:55 AM
>To: tlug@example.com
>Subject: Re: [tlug] perl, cgi, and moji-baki
>
>
>Hi Erin.
>
>Are you sure you want to be sending the e-mail to the customer in Shift-JIS?
>
>Your e-mail headers say ISO-2022-JP, which is 7-bit JIS encoding, not 
>Shift-JIS.
>
>You should probably be sending the e-mail in ISO-2022-JP, but if you 
>have to send it in Shift-JIS, you'll need to adjust your e-mail headers.
>
>Edmund
>
>
>Erin D. Hughes wrote:
>
>  
>
>>Hey can I ask any one give me a little assistance with a cgi I am trying to
>>create. It is really a simple thing but it is not coming out well at all. 
>>
>>1. I need the data to go into the db as EUC. Already happening page is
>>encoded with EUC so data comes in that format.
>>2. I need sent the thank you e-mail to the customer in Shift-JIS, Using
>>Jcode I think that I have achieved that with header info.
>>3. Currently both functions are working except when a Mac user receives the
>>mail. There it is Moji Baki.   
>>
>><code>
>>my $name_coded		= &jcode::sjis($name);
>>my $body_coded		= &jcode::sjis($body);
>>
>>
>>my $mail = qq(To: $email
>>Reply-to: $reply_to
>>From: $reply_to
>>Subject: $subject
>>Content-type: text/plain; charset="ISO-2022-JP"
>>Content-transfer-encoding: 7bit
>>Status:  	
>>
>>
>>$name_coded  —l
>>$body_coded
>>
>>);
>>
>>###OLD SEND MAIL 
>>open(MAIL,"| sendmail -t") || die "can't pipe to sendmail";
>>print MAIL $mail;
>>close(MAIL); 
>>
>></code>
>>
>>Thanks in advance for any usefull info (thanks as well for the unusefull
>>stuff)!
>>
>>Erin
>>
>> 
>>
>>    
>>
>
>  
>


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links