环境:
suse linux enterprise server 11
perl 5.10
我是在linux写了perl脚本来发邮件,在windows端用outlook或者foxmail来接收邮件
$a="一些中文字符串";
$b=decode("utf8",$a);
$c=encode("gb2312",$b);
…
$smtp->datasend("$c\n");
decode:
to convert utf8 data to a string in Perl's internal format
encode:
to convert a string from Perl's internal format to gb2312
suse linux enterprise server 11
perl 5.10
我是在linux写了perl脚本来发邮件,在windows端用outlook或者foxmail来接收邮件
$a="一些中文字符串";
$b=decode("utf8",$a);
$c=encode("gb2312",$b);
…
$smtp->datasend("$c\n");
decode:
to convert utf8 data to a string in Perl's internal format
encode:
to convert a string from Perl's internal format to gb2312