summaryrefslogtreecommitdiff
path: root/img/lib/IM/EncDec.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2010-02-28 06:37:24 +0000
committerfukachan <fukachan>2010-02-28 06:37:24 +0000
commite314db340e6b4afc2dc9b9a6745dea18f3cc0844 (patch)
tree8aa695a4228ff273f17d123f540d22d901492cd3 /img/lib/IM/EncDec.pm
parentddc1ed19d3f9d8d8840bea932174a68749550330 (diff)
downloadfml8-im-150.tar.gz
fml8-im-150.tar.bz2
fml8-im-150.zip
import im-150im-150
Diffstat (limited to 'img/lib/IM/EncDec.pm')
-rw-r--r--img/lib/IM/EncDec.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/img/lib/IM/EncDec.pm b/img/lib/IM/EncDec.pm
index ac4560a6..5126b9b3 100644
--- a/img/lib/IM/EncDec.pm
+++ b/img/lib/IM/EncDec.pm
@@ -5,10 +5,10 @@
###
### Author: Internet Message Group <img@mew.org>
### Created: Apr 23, 1997
-### Revised: Jul 4, 2004
+### Revised: Apr 23, 2007
###
-my $PM_VERSION = "IM::EncDec.pm version 20031028(IM146)";
+my $PM_VERSION = "IM::EncDec.pm version 20100215(IM150)";
package IM::EncDec;
require 5.003;
@@ -99,6 +99,10 @@ sub mime_encode_string($$$) {
$point ++;
}
$nstr = $nstr . "\n";
+ if ($s eq chr(27)) {
+ # IN
+ $in = 1;
+ }
}
}
if ($in == 1) {
@@ -137,7 +141,7 @@ sub mime_decode_string($) {
sub mime_decode($$$) {
my($cs, $bq, $str) = @_;
- my $ret = &{$$mime_decode_switch{uc($3)}}($4);
+ my $ret = &{$$mime_decode_switch{uc($bq)}}($str);
if ($cs =~ /iso-8859-([2-9])/i) {
$ret = iso_8859_to_ctext($ret, $1);
} elsif ($cs =~ /koi8-r/i) {
@@ -152,7 +156,8 @@ sub mime_decode($$$) {
$ret = euc_jp_to_ctext($ret);
} elsif ($cs =~ /euc-kr/i) {
$ret = euc_kr_to_ctext($ret);
- } elsif ($cs =~ /shift_jis/i) {
+ } elsif ($cs =~ /shift_jis/i ||
+ $cs =~ /ms_kanji/i || $cs =~ /windows-31j/i) {
$ret = shift_jis_to_ctext($ret);
} elsif ($cs =~ /big5/i || $cs =~ /cn-big5/i) {
$ret = big5_to_ctext($ret);