From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 19 Jan 2008 09:25:00 -0800 Subject: [sup-talk] char. encoding problems - garbled output In-Reply-To: <478F4F67.1040405@iki.fi> References: <478F4F67.1040405@iki.fi> Message-ID: <1200763427-sup-2564@south> Hi Marko, Reformatted excerpts from =?UTF-8?B?TWFya28gTXlsbHltw6RraQ==?='s message of 2008-01-17: > This kind of content-type works fine with umlaut ??????: > Content-type: text/plain; charset=ISO-8859-1; format=flowed > > But this doesn't: > Content-type: text/plain; Format=Flowed; Charset=iso-8859-1 Does the following patch help? diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 47bc1c2..ceaf0b8 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -62,7 +62,7 @@ module RMail end def charset - if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/ + if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/i $1 end end -- William