Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] [PATCH] mime-decode hook: provide a "charset" variable with the attachment charset
@ 2009-07-10 15:00 Adeodato Simó
  2009-07-23  9:35 ` Adeodato Simó
  0 siblings, 1 reply; 11+ messages in thread
From: Adeodato Simó @ 2009-07-10 15:00 UTC (permalink / raw)


This is useful, for example, for HTML attachments which are sent in a
charset different from the default for the system (eg., ISO-8859-1 on an
UTF-8 system), so that the converter program can be told what charset it
should be converting from.

Signed-off-by: Adeodato Sim? <dato at net.com.org.es>
---
 lib/sup/message-chunks.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
index 0d742d9..ea04ed7 100644
--- a/lib/sup/message-chunks.rb
+++ b/lib/sup/message-chunks.rb
@@ -50,7 +50,8 @@ directly in Sup. For attachments that you wish to use a separate program
 to view (e.g. images), you should use the mime-view hook instead.
 
 Variables:
-   content_type: the content-type of the message
+   content_type: the content-type of the attachment
+        charset: the charset of the attachment, if applicable
        filename: the filename of the attachment as saved to disk
   sibling_types: if this attachment is part of a multipart MIME attachment,
                  an array of content-types for all attachments. Otherwise,
@@ -103,6 +104,7 @@ EOS
         else
           HookManager.run "mime-decode", :content_type => content_type,
                           :filename => lambda { write_to_disk },
+                          :charset => encoded_content.charset,
                           :sibling_types => sibling_types
         end
 
-- 
1.6.3.3



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

end of thread, other threads:[~2009-09-26 18:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 15:00 [sup-talk] [PATCH] mime-decode hook: provide a "charset" variable with the attachment charset Adeodato Simó
2009-07-23  9:35 ` Adeodato Simó
2009-07-27 16:51   ` William Morgan
2009-07-30 15:56     ` Adeodato Simó
2009-07-30 15:57       ` [sup-talk] [PATCH] HookContext::method_missing(): allow locals to be nil Adeodato Simó
2009-08-19 21:22       ` [sup-talk] [PATCH] mime-decode hook: provide a "charset" variable with the attachment charset Adeodato Simó
2009-08-22 18:15         ` William Morgan
2009-08-22 19:16           ` Adeodato Simó
2009-08-23 17:34             ` William Morgan
2009-09-13 23:17               ` Adeodato Simó
2009-09-26 18:12                 ` William Morgan

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