Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [issue132] strange encoding error
@ 2010-11-23 10:36 anonymous
  2011-03-22  0:11 ` Gaute Hope
  0 siblings, 1 reply; 2+ messages in thread
From: anonymous @ 2010-11-23 10:36 UTC (permalink / raw)
  To: sup-devel


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
serialize_low'
/usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/message.rb:155:in `block in
each_part'
/usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/message.rb:154:in `each'
/usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/message.rb:154:in `each_part'
/usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/serialize.rb:96:in
`serialize_low'
/usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/serialize.rb:63:in `serialize'
/usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/message.rb:146:in `to_s'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/modes/edit-message-mode.rb:344:in
`puts'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/modes/edit-message-mode.rb:344:in
`block in send_message'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/modes/edit-message-mode.rb:344:in
`popen'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/modes/edit-message-mode.rb:344:in
`send_message'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/mode.rb:59:in `handle_input'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/lib/sup/buffer.rb:279:in `handle_input'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup:279:in `<module:Redwood>'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.11/bin/sup:68:in `<top (required)>'
/usr/bin/sup:19:in `load'
/usr/bin/sup:19:in `<main>'

----------
messages: 311
nosy: anonymous
priority: bug
ruby_version: 1.9.1
status: unread
sup_version: 0.11
title: strange encoding error

_________________________________________
Sup issue tracker <sup-bugs@masanjin.net>
<http://masanjin.net/sup-bugs/issue132>
_________________________________________
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-devel] [issue132] strange encoding error
  2010-11-23 10:36 [sup-devel] [issue132] strange encoding error anonymous
@ 2011-03-22  0:11 ` Gaute Hope
  0 siblings, 0 replies; 2+ messages in thread
From: Gaute Hope @ 2011-03-22  0:11 UTC (permalink / raw)
  To: sup-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-22  0:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 10:36 [sup-devel] [issue132] strange encoding error anonymous
2011-03-22  0:11 ` Gaute Hope

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox