Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [issue132] strange encoding error
Date: Tue, 22 Mar 2011 01:11:16 +0100	[thread overview]
Message-ID: <1300752553-sup-725@qwerzila> (raw)
In-Reply-To: <1290508608.33.0.253409523291.issue132@masanjin.net>

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


      reply	other threads:[~2011-03-22  0:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 10:36 anonymous
2011-03-22  0:11 ` Gaute Hope [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300752553-sup-725@qwerzila \
    --to=eg@gaute.vetsj.com \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox