From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (c3F61BF51.dhcp.bluecom.no [81.191.97.63]) by mx.google.com with ESMTPS id j11sm2727593faa.44.2011.03.21.17.07.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 17:07:48 -0700 (PDT) Content-Type: text/plain; charset=UTF-8 From: Gaute Hope To: sup-devel Subject: Re: [sup-devel] [issue132] strange encoding error In-reply-to: <1290508608.33.0.253409523291.issue132@masanjin.net> References: <1290508608.33.0.253409523291.issue132@masanjin.net> Date: Tue, 22 Mar 2011 01:11:16 +0100 Message-Id: <1300752553-sup-725@qwerzila> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Excerpts from anonymous's message of 2010-11-23 11:36:48 +0100: > > New submission from anonymous: > > this happens when i try to send an email... > > ---------------------------------------------------------------- > --- Encoding::CompatibilityError from thread: main > incompatible character encodings: UTF-8 and ASCII-8BIT > /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/serialize.rb:112:in > `serialize_low' > /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/serialize.rb:99:in `block in Hi, ran into the same problem today; this seems to be a problem with rmail. Apply this patch to the installed gem: diff -ru rmail-1.0.0/lib/rmail/serialize.rb rmail-1.0.0-new//lib/rmail/serialize.rb --- rmail-1.0.0/lib/rmail/serialize.rb 2011-03-22 01:08:07.413333337 +0100 +++ rmail-1.0.0-new//lib/rmail/serialize.rb 2011-03-22 01:07:45.183333337 +0100 @@ -109,6 +109,7 @@ @output << message.header.to_s unless message.body.nil? @output << "\n" + message.body.force_encoding 'UTF-8' @output << message.body if depth == 0 and message.body.length > 0 and message.body[-1] != ?\n Best regards, Gaute Hope