Subject: [sup-talk] char. encoding problems - garbled output

From: [email-masked] (Marko Myllymäki)
Date: Thu, 17 Jan 2008 14:51:51 +0200

Hi,

Sup seems very promising email-client for my purposes, good job! 
However, I have some problems with wrong character encodings which 
garble the sup output a bit unusable...
Uppercase umlaut characters seem to be the biggest problem. But I may 
also have some configuration option wrong..

The following mail has weird content-type:
Content-type: multipart/mixed; boundary="===============2134700068=="

And here is the garbled output for that mail, which makes also other 
lines in the message list interface garbled :(
----
Yest. 9am laskutus >Some subject text... +/INBOX K?~DYT?~D EHDOTTOMASTI 
VIITETT
?~D Jan 15
----

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

I'm not actually sure what causes these problems, there may be something 
else too... at the moment I'm using thunderbird email client and it 
handles all the encodings well. But I want to change it to Sup :)

-Marko

---

From: [email-masked] (William Morgan)
Date: Sat, 19 Jan 2008 09:25:00 -0800

Hi Marko,

> 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 <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Marko Myllymäki)
Date: Fri, 25 Jan 2008 14:09:53 +0200

> Does the following patch help?

Sorry, I'm really Sup-newbie and I don't know how to apply these patches yet :)
... figuring it out later.

I think the problems are mainly caused by the wide characters (whatever that
means, I guess multibyte codes). I'm using Sup as my main email-client now, 0.4
works quite nicely. When I have time I try to dig into these character things
and read more your devel notes.

---

From: [email-masked] (William Morgan)
Date: Wed, 30 Jan 2008 09:24:12 -0800

Reformatted excerpts from Marko Myllym?ki's message of 2008-01-25:
> Sorry, I'm really Sup-newbie and I don't know how to apply these
> patches yet :) ... figuring it out later.

That change went out in the 0.4 release, so hopefully 0.4 will work for
you.