summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2017-12-31 09:20:26 +0000
committerfukachan <fukachan>2017-12-31 09:20:26 +0000
commitb27f117efc1984db28fe58b065992525cb5f5dd8 (patch)
tree4e422789a96f142e80b2b3e64699102e7b394647 /fml/lib
parent7662de8691e29232e8f1ee95adcd04ca26a42db9 (diff)
downloadfml8-b27f117efc1984db28fe58b065992525cb5f5dd8.tar.gz
fml8-b27f117efc1984db28fe58b065992525cb5f5dd8.tar.bz2
fml8-b27f117efc1984db28fe58b065992525cb5f5dd8.zip
apply patch to fix charset handling in Content-Type header
Thanks to <mizuki@myokoo.jp>.
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/Mail/Message.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/fml/lib/Mail/Message.pm b/fml/lib/Mail/Message.pm
index f020f452..32aeee8f 100644
--- a/fml/lib/Mail/Message.pm
+++ b/fml/lib/Mail/Message.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Message.pm,v 1.104 2006/01/09 14:00:55 fukachan Exp $
+# $FML: Message.pm,v 1.105 2006/04/15 06:33:01 fukachan Exp $
#
package Mail::Message;
@@ -2211,10 +2211,14 @@ sub charset
return $self->{ charset };
}
# content-type: text/plain; charset=ISO-2022-JP
+ # patch: <mizuki@myokoo.jp> 2017/02/09
+ # XXX /.*?/ vs /\S+/, strange MUA exists ? e.g. charset="ISO 2022 JP"
elsif (defined($buf) && $buf) {
my $_buf = $buf;
$_buf =~ s/\s*//gm;
- if ($_buf =~ /Content-Type:.*charset=\"(\S+)\"/i ||
+ if ($_buf =~ /Content-Type:.*charset=\"(.*?);\"/i ||
+ $_buf =~ /Content-Type:.*charset=(.*?);/i ||
+ $_buf =~ /Content-Type:.*charset=\"(\S+)\"/i ||
$_buf =~ /Content-Type:.*charset=(\S+)/i) {
my $charset = $1;
$charset =~ tr/A-Z/a-z/;