From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.79.9 with SMTP id c9cs37346agb; Tue, 3 Nov 2009 09:16:56 -0800 (PST) Received: by 10.224.42.134 with SMTP id s6mr122851qae.352.1257268615884; Tue, 03 Nov 2009 09:16:55 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 34si359467qyk.93.2009.11.03.09.16.55; Tue, 03 Nov 2009 09:16:55 -0800 (PST) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 8F2CD3C8060; Tue, 3 Nov 2009 12:16:55 -0500 (EST) Received: from entry.masanjin.net (masanjin.net [209.20.72.13]) by rubyforge.org (Postfix) with ESMTP id 6E69A1598079 for ; Tue, 3 Nov 2009 12:16:34 -0500 (EST) Received: from w by entry.masanjin.net with local (Exim 4.69) (envelope-from ) id 1N5Mzg-0003aD-IH for sup-talk@rubyforge.org; Tue, 03 Nov 2009 09:16:33 -0800 From: William Morgan To: sup-talk In-reply-to: <1255961127-sup-3168@tihlde.org> References: <1255961127-sup-3168@tihlde.org> Date: Tue, 03 Nov 2009 09:16:32 -0800 Message-Id: <1257264198-sup-8152@masanjin.net> User-Agent: Sup/git Subject: Re: [sup-talk] [PATCH] detect and set charset on text/* attachments X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org Reformatted excerpts from Helge Titlestad's message of 2009-10-19: > I got some feedback from non-suppers that my utf-8 text attachments > were messed up. When I checked they (the MIME headers) lacked any info > on charset, which I believe should be set for text/*. After reviewing the RFCs, yeah, I think you're basically right. The charset parameter is not required to be set for text/* mime types, but if it's unset, the part is assumed to be us-ascii. > Here's a patch that uses the chardet gem to (try to) detect the > appropriate charset and sets it in the Content-Type header. Although I don't relish adding yet another gem dependency, I think this is the right approach. It looks like the chardet gem is unmaintained. But someone decided to make their own special version called rchardet which is completely equivalent version but *is* maintained. (What is it with these goddamn ruby people.) I suggest we use rchardet instead of chardet. Would you like to change the patch? If not, I will get to it at some point. > Please tell me if I should use some different way of sending > patches... This git flow is a bit new to me. (= Nope, this is perfect. Thanks! -- William _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk