Mailing List Archive


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

[tlug] Japanese Perl and Sendmail



:) smile me again after a short break I am back on trying to get
Japanese text from Perl below is my current relevant portion.  The
subject line prints correclty but the body does not ----PLEASE tell me I
am doing something stupid and this is an neasy fix, if not....any
ideas??? (keep in mind I dont use Japanese in Perl much and am most
likely missing something) :)

----------------------start program-----------------------------
#!/usr/bin/perl

use MIME::Base64;

my $MAILBIN = "/usr/sbin/sendmail";
my @example.com = ("-oi", "-tr", "$ENV_FROM");
$SIG{PIPE} = \&PipeHandler;
$ENV{PATH} = "/bin:/usr/bin:/sbin:/usr/sbin";

my $pid = open(MAIL, "|-")||exec("$MAILBIN", @example.com);
print MAIL "From: admin@example.com";
print MAIL "To: dblomber\@example.com";
print MAIL 'Content-Type: text/plain; charset="ISO-2022-JP"' . "\n";
#$temp = MIME::Base64::encode("?????????");
#chomp($temp);
#print MAIL "=?UTF-8?B?$temp?=\n";
print MAIL "Subject:
=?ISO-2022-JP?B?GyRCSVRANSVRJTklbyE8JUk+cEpzGyhCCg==?=\n";
print MAIL "=?ISO-2022-JP?B?GyRCSVRANSVRJTklbyE8JUk+cEpzGyhCCg==?=\n";

----------------------------end program--------------------------------

-- 
David Blomberg
AIS, APS, ASE, CCNA, LCP, LCA, Linux+, LPI I, MCP, MCSA, MCSE, RHCE, Server+
Nihon Libertec
dblomber@example.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links