diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_automated_mail_note qmail-scanner-1.23/locale/ja_JP.EUC/recips_automated_mail_note
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_automated_mail_note	Thu Oct 16 10:51:57 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_automated_mail_note	Thu Aug 12 08:54:24 2004
@@ -1,5 +1,5 @@
 
 
-[È¯¿®¼Ô¤¬¥á¥¤¥ê¥ó¥°¥ê¥¹¥È¤Þ¤¿¤ÏÂ¾¤Î¼«Æ°²½¥á¥Ã¥»¡¼¥¸¤Ê¤Î¤Ç¡¢
+[È¯¿®¸µ¤¬¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ê¤É¼«Æ°²½¥·¥¹¥Æ¥à¤Î¤è¤¦¤Ê¤Î¤Ç¡¢
 ¤³¤Î¥á¥Ã¥»¡¼¥¸¤ÏÈ¯¿®¼Ô¤Î¥¢¥É¥ì¥¹¤Ë¤ÏÁ÷¤é¤ì¤Æ¡²¤¤¤Þ¤»¤ó¡²¡£]
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_content qmail-scanner-1.23/locale/ja_JP.EUC/recips_content
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_content	Thu Oct 16 10:51:57 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_content	Thu Aug 12 09:14:00 2004
@@ -8,7 +8,8 @@
 
 MAIL FROM: %%returnpath
 RCPT TO:   %%recips 
+SUBJECT:   %%subj_conved
 
-... ¤½¤·¤Æ°Ê²¼¤Î¥Ø¥Ã¥À¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹:
+... ¤Þ¤¿¡¢¥Ø¥Ã¥À¡¼¤Ï°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤·¤¿:
 
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_explanation qmail-scanner-1.23/locale/ja_JP.EUC/recips_explanation
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_explanation	Thu Oct 16 10:51:57 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_explanation	Thu Aug 12 08:51:46 2004
@@ -1,4 +1,4 @@
-%%destring ¤¬¡¢¤¢¤Ê¤¿°¸¤ÎemailÃæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿¡£
-email¤Î¥¹¥­¥ã¥Ê¡¼¤¬¤½¤ì¤òÊáÂª¤·¡¢
-¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤¬¤¢¤Ê¤¿¤ËÇÛÁ÷¤µ¤ì¤ëÁ°¤ËÄä»ß¤µ¤»¤Þ¤·¤¿¡£
+¤¢¤Ê¤¿°¸¤Î¥á¡¼¥ë¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿¡£
+¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬¥¦¥¤¥ë¥¹¤òÊáÂª¤·¡¢
+¤¢¤Ê¤¿¤ËÇÛÁ÷¤µ¤ì¤Ê¤¤¤è¤¦¡¢¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤ò¥¹¥È¥Ã¥×¤·¤Þ¤·¤¿¡£
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_msg_description qmail-scanner-1.23/locale/ja_JP.EUC/recips_msg_description
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_msg_description	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_msg_description	Thu Aug 12 09:12:58 2004
@@ -4,11 +4,12 @@
 
 ¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤Ï¾ðÊóµ»½ÑÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
 
-¤¢¤Ê¤¿¤ØÁ÷¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹:
+¤¢¤Ê¤¿¤ØÁ÷¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿:
 
 MAIL FROM: %%returnpath
 RCPT TO:   %%recips 
+SUBJECT:   %%subj_conved
 
-... ¤½¤·¤Æ°Ê²¼¤Î¥Ø¥Ã¥À¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹:
+... ¤Þ¤¿¡¢¥Ø¥Ã¥À¡¼¤Ï°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤·¤¿:
 
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_not_automated_mail_note qmail-scanner-1.23/locale/ja_JP.EUC/recips_not_automated_mail_note
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_not_automated_mail_note	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_not_automated_mail_note	Thu Aug 12 08:48:18 2004
@@ -1,4 +1,4 @@
 
-[È¯¿®¼Ô°¸¤Ë¡¢Èà¤¬¤¢¤Ê¤¿¤ËÁ÷¤Ã¤¿emailÃæ¤Ë¥¦¥¤¥ë¥¹¤¬Â¸ºß¤·¤Æ¤¤¤¿»Ý¤Î
-¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ê¤Þ¤·¤¿¡£¤¢¤Ê¤¿¤ÎÂ¦¤Ç¤Ï¤³¤ì°Ê¾å¤Îºî¶È¤ÏÉ¬Í×¤¢¤ê¤Þ¤»¤ó¡£]
+[¤¢¤Ê¤¿¤ËÁ÷¤Ã¤¿¥á¡¼¥ë¤ÎÃæ¤Ë¥¦¥¤¥ë¥¹¤¬Â¸ºß¤·¤Æ¤¤¤¿¤È¤¤¤¦»Ý¤Î¥á¥Ã¥»¡¼¥¸¤ò¡¢
+È¯¿®¼Ô°¸¤ËÁ÷¤ê¤Þ¤·¤¿¡£¤¢¤Ê¤¿¤ÏÆÃ¤Ë²¿¤â¤¹¤ëÉ¬Í×¤Ï¤¢¤ê¤Þ¤»¤ó¡£]
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_quarantine qmail-scanner-1.23/locale/ja_JP.EUC/recips_quarantine
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_quarantine	Tue Jan 13 08:43:46 2004
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_quarantine	Thu Aug 12 08:45:30 2004
@@ -1,12 +1,12 @@
 
 
-¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
+%%V_FROMNAME ¤Ë¤è¤ë¾ÜºÙ¤ÊÊ¬ÀÏ¤¬¤Ç¤­¤ë¤è¤¦¡¢
+¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î¾ì½ê¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
 
   %%hostname:%%scandir/%%vmaildir/new/%%file_id
 
-¤½¤³¤Ç¡¡%%V_FROMNAME ¤¬¤µ¤é¤Ë¿ÇÃÇ¤Ç¤­¤Þ¤¹¡£.
 
-¤½¤Î¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿¤È¤­¡¢email¥¹¥­¥ã¥Ê¡¼¤Ï°Ê²¼¤Î¤è¤¦¤ËÊó¹ð¤·¤Þ¤·¤¿:
+¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿ºÝ¤Ë¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬ÊÖ¤·¤¿Êó¹ð¤Ï²¼µ­:
 
 --- 
 %%description
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_subject qmail-scanner-1.23/locale/ja_JP.EUC/recips_subject
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/recips_subject	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/recips_subject	Thu Aug 12 11:15:30 2004
@@ -1,2 +1,2 @@
-¤¬¼õ¤±¼è¤Ã¤¿¥á¥Ã¥»¡¼¥¸Ãæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿
+¤¢¤Ê¤¿°¸¤Î¥á¥Ã¥»¡¼¥¸¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_automated_mail_note qmail-scanner-1.23/locale/ja_JP.EUC/sender_automated_mail_note
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_automated_mail_note	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/sender_automated_mail_note	Thu Aug 12 09:01:58 2004
@@ -1,4 +1,4 @@
 
 
-[È¯¿®¼Ô¤¬¥á¥¤¥ê¥ó¥°¥ê¥¹¥È¤Þ¤¿¤ÏÂ¾¤Î¼«Æ°²½¥á¥Ã¥»¡¼¥¸¤Ê¤Î¤Ç¡¢
+[È¯¿®¸µ¤¬¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ê¤É¼«Æ°²½¥·¥¹¥Æ¥à¤Î¤è¤¦¤Ê¤Î¤Ç¡¢
 ¤³¤Î¥á¥Ã¥»¡¼¥¸¤ÏÈ¯¿®¼Ô¤Î¥¢¥É¥ì¥¹¤Ë¤ÏÁ÷¤é¤ì¤Æ¡²¤¤¤Þ¤»¤ó¡²¡£]
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_explanation qmail-scanner-1.23/locale/ja_JP.EUC/sender_explanation
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_explanation	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/sender_explanation	Thu Aug 12 09:01:18 2004
@@ -1,7 +1,7 @@
 
-%%destring ¤¬¡¢¤¢¤Ê¤¿¤¬Á÷¤Ã¤¿emailÃæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿¡£
-email¤Î¥¹¥­¥ã¥Ê¡¼¤¬¤½¤ì¤òÊáÂª¤·¡¢
-¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤¬°¸Àè¤ËÇÛÁ÷¤µ¤ì¤ëÁ°¤ËÄä»ß¤µ¤»¤Þ¤·¤¿¡£
+¤¢¤Ê¤¿¤ÎÁ÷¤Ã¤¿¥á¡¼¥ë¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿¡£
+¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬¥¦¥¤¥ë¥¹¤òÊáÂª¤·¡¢
+°¸Àè¤ËÇÛÁ÷¤µ¤ì¤Ê¤¤¤è¤¦¡¢¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤ò¥¹¥È¥Ã¥×¤·¤Þ¤·¤¿¡£
 
 ¸¡½Ð¤µ¤ì¤¿ %%destring ¤Ï:
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_msg_description qmail-scanner-1.23/locale/ja_JP.EUC/sender_msg_description
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_msg_description	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/sender_msg_description	Thu Aug 12 09:00:12 2004
@@ -1,11 +1,12 @@
 
 
-¤¢¤Ê¤¿¤¬Á÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹:
+¤¢¤Ê¤¿¤ÎÁ÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿:
 
 MAIL FROM: %%returnpath
 RCPT TO:   %%recips 
+SUBJECT:   %%subj_conved
 
-... ¤½¤·¤Æ°Ê²¼¤Î¥Ø¥Ã¥À¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹:
+... ¤Þ¤¿¡¢¥Ø¥Ã¥À¡¼¤Ï°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤·¤¿:
 
 
 
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_quarantine qmail-scanner-1.23/locale/ja_JP.EUC/sender_quarantine
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_quarantine	Tue Jan 13 08:43:46 2004
+++ qmail-scanner-1.23/locale/ja_JP.EUC/sender_quarantine	Thu Aug 12 08:58:40 2004
@@ -1,12 +1,12 @@
 
 
-¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
+%%V_FROMNAME ¤Ë¤è¤ë¾ÜºÙ¤ÊÊ¬ÀÏ¤¬¤Ç¤­¤ë¤è¤¦¡¢
+¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î¾ì½ê¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
 
   %%hostname:%%scandir/%%vmaildir/new/%%file_id
 
-¤½¤³¤Ç¡¡%%V_FROMNAME ¤¬¤µ¤é¤Ë¿ÇÃÇ¤Ç¤­¤Þ¤¹¡£.
 
-¤½¤Î¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿¤È¤­¡¢email¥¹¥­¥ã¥Ê¡¼¤Ï°Ê²¼¤Î¤è¤¦¤ËÊó¹ð¤·¤Þ¤·¤¿:
+¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿ºÝ¤Ë¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬ÊÖ¤·¤¿Êó¹ð¤Ï²¼µ­:
 
 --- 
 %%description
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_subject qmail-scanner-1.23/locale/ja_JP.EUC/sender_subject
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_subject	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/sender_subject	Thu Aug 12 11:16:54 2004
@@ -1 +1 @@
-¤¬Á÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸Ãæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿
+¤¢¤Ê¤¿¤ÎÁ÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿
diff -ur qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_virus_content qmail-scanner-1.23/locale/ja_JP.EUC/sender_virus_content
--- qmail-scanner-1.23.org/locale/ja_JP.EUC/sender_virus_content	Thu Oct 16 10:51:58 2003
+++ qmail-scanner-1.23/locale/ja_JP.EUC/sender_virus_content	Thu Aug 12 08:55:56 2004
@@ -1,5 +1,5 @@
 
-Â¨¹ï¤¢¤Ê¤¿¤Î¥¦¥¤¥ë¥¹¸¡½Ð¥½¥Õ¥È¤ò¹¹¿·¤¹¤ë¤«¡¢
-¤¢¤Ê¤¿¤Î¥·¥¹¥Æ¥à¤Ë¥¦¥¤¥ë¥¹¤¬´¶À÷¤·¤Æ¤¤¤ë»Ý¤ò
+¤¹¤°¤Ë¤¢¤Ê¤¿¤Î¥¦¥¤¥ë¥¹¸¡½Ð¥½¥Õ¥È¤ò¹¹¿·¤¹¤ë¤«¡¢
+¤¢¤Ê¤¿¤Î¥·¥¹¥Æ¥à¤¬¥¦¥¤¥ë¥¹¤Ë´¶À÷¤·¤Æ¤¤¤ë»Ý¤ò
 ¾ðÊóµ»½ÑÃ´Åö¼Ô¤ËÏ¢Íí¤·¤Æ¤¯¤À¤µ¤¤¡£
 
diff -ur qmail-scanner-1.23.org/qmail-scanner-queue.template qmail-scanner-1.23/qmail-scanner-queue.template
--- qmail-scanner-1.23.org/qmail-scanner-queue.template	Tue Aug  3 11:26:19 2004
+++ qmail-scanner-1.23/qmail-scanner-queue.template	Sat Aug 14 18:23:10 2004
@@ -269,6 +269,9 @@
 
 use Getopt::Std;
 
+use Jcode;
+use MIME::Base64;
+
 #my ($opt_v,$opt_h,$opt_g,$opt_r,$opt_z);
 
 getopts('vhgrz');
@@ -1885,8 +1888,14 @@
       &debug("e_s: don't notify admin");
     }
   }
-  $tmpsubj="$destring LOCALE_sender_subject \"$headers{'subject'}\"";
+  my $subj_conved= $headers{'subject'};
+  if ( $subj_conved =~ /=\?.+-jp\?.*\?=/i ) {
+    $subj_conved =~ s/(\r|\0|\n)/ /g;
+    $subj_conved = jcode($subj_conved)->mime_decode;
+  }
+  $tmpsubj="LOCALE_sender_subject \"$headers{'subject'}\"";
   $tmpsubj =~ s/(\r|\0|\n)/ /g;
+  $tmpsubj = jcode($tmpsubj)->mime_encode;
   print SM "Subject: $tmpsubj\n";
   print SM "Message-ID: <".&uniq_id."\@$hostname>\n";
   print SM "X-Tnz-Problem-Type: 40\n";
@@ -1946,8 +1955,14 @@
     &debug("e_r: sending quarantine report via: $qmailinject to recip address ($recip)");
     print SM "To: $recip\n";
   }
-  $tmpsubj= "$destring LOCALE_recips_subject \"$headers{'subject'}\"";
+  my $subj_conved= $headers{'subject'};
+  if ( $subj_conved =~ /=\?.+-jp\?.*\?=/i ) {
+    $subj_conved =~ s/(\r|\0|\n)/ /g;
+    $subj_conved = jcode($subj_conved)->mime_decode;
+  }
+  $tmpsubj= "LOCALE_recips_subject \"$headers{'subject'}\"";
   $tmpsubj =~ s/(\r|\0|\n)/ /g;
+  $tmpsubj = jcode($tmpsubj)->mime_encode;
   print SM "Subject: $tmpsubj\n";
   print SM "Message-ID: <".&uniq_id."\@$hostname>\n";
   print SM "X-Tnz-Problem-Type: 40\n";
