From 3e29f04a94902958827585b02591094de67dd36a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 26 Jan 2008 16:41:13 +0000 Subject: Bug 413672: email_in.pl incorrectly rejects quoted charsets - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- email_in.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'email_in.pl') diff --git a/email_in.pl b/email_in.pl index 02d00a3e2..ca7a29735 100644 --- a/email_in.pl +++ b/email_in.pl @@ -294,7 +294,8 @@ sub get_text_alternative { foreach my $part (@parts) { my $ct = $part->content_type || 'text/plain'; my $charset = 'iso-8859-1'; - if ($ct =~ /charset=([^;]+)/) { + # The charset may be quoted. + if ($ct =~ /charset="?([^;"]+)/) { $charset= $1; } debug_print("Part Content-Type: $ct", 2); -- cgit v1.2.3-24-g4f1b