[Affelio-cvs 1248] CVS update: affelio/lib/Affelio/NetLib

Back to archive index

Tadashi Okoshi slash****@users*****
2006年 5月 8日 (月) 22:12:53 JST


Index: affelio/lib/Affelio/NetLib/Email.pm
diff -u affelio/lib/Affelio/NetLib/Email.pm:1.13 affelio/lib/Affelio/NetLib/Email.pm:1.14
--- affelio/lib/Affelio/NetLib/Email.pm:1.13	Mon May  8 21:47:12 2006
+++ affelio/lib/Affelio/NetLib/Email.pm	Mon May  8 22:12:53 2006
@@ -14,7 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-# $Id: Email.pm,v 1.13 2006/05/08 12:47:12 slash5234 Exp $
+# $Id: Email.pm,v 1.14 2006/05/08 13:12:53 slash5234 Exp $
 
 package Affelio::NetLib::Email; 
 {
@@ -42,14 +42,16 @@
 	my $body = shift;
 	my $filename = shift;
 	my $attach = shift;
-	my $encoding = shift;	#ISO-2022-JP
-	    
-	if($encoding eq ""){
-	    $encoding = "utf-8";
+	my $locale = shift;
+
+	####
+	#Encoding for each locale
+	my $encoding = "utf-8";
+	if($locale eq "ja"){
+	    $encoding = "iso-2022-jp";	    
 	}
 
 	my $boundary = "-*-*-*-*-*-*-*-*-Boundary_" . time . "_" . $$;
-
 	my $eol = "";
 
 	#####
@@ -60,6 +62,8 @@
 	my $subject_b = MIME::Base64::encode_base64($subject, $eol);
 	$subject_b = "=?$encoding?B?" . $subject_b . "?=";
 
+	#####
+	#Other headers
 	my $headers = "From: $from_name <$from_addr>\nMIME-Version: 1.0\n";
 	if ($attach ne "" && $filename ne ""){
 	    $filename = MIME::Base64::encode_base64($filename, $eol);


Affelio-cvs メーリングリストの案内
Back to archive index