[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sup-devel] (REVIEW NEEDED) [PATCH] Recode attachments to UTF-8 when forwarding



Hi,

can you please review the attached patch? It recodes attachments from whichever
charset they are encoded in to UTF-8 when forwarding messages in order to
please rmail (it crashes with attachments encoded in Windows-1252 otherwise).

FYI, the crash backtrace is the following (pathes shortened):
--- Encoding::CompatibilityError from thread: main
incompatible character encodings: UTF-8 and ASCII-8BIT
rmail-1.0.0/lib/rmail/serialize.rb:112:in `serialize_low'
rmail-1.0.0/lib/rmail/serialize.rb:99:in `block in serialize_low'
rmail-1.0.0/lib/rmail/message.rb:155:in `block in each_part'
rmail-1.0.0/lib/rmail/message.rb:154:in `each'
rmail-1.0.0/lib/rmail/message.rb:154:in `each_part'
rmail-1.0.0/lib/rmail/serialize.rb:96:in `serialize_low'
rmail-1.0.0/lib/rmail/serialize.rb:63:in `serialize'
rmail-1.0.0/lib/rmail/message.rb:146:in `to_s'
sup/lib/sup/modes/edit-message-mode.rb:344:in `puts'
sup/lib/sup/modes/edit-message-mode.rb:344:in `block in send_message'
sup/lib/sup/modes/edit-message-mode.rb:344:in `popen'
sup/lib/sup/modes/edit-message-mode.rb:344:in `send_message'
sup/lib/sup/mode.rb:59:in `handle_input'
sup/lib/sup/buffer.rb:277:in `handle_input'

So, if you have a better way of handling this, please let us know.

Best regards,
Michael

Attachment: 0001-Recode-attachments-to-UTF-8-when-forwarding.patch
Description: Binary data

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel