Sunday, March 6, 2011

In Ruby, what are the best packages for decoding, encoding?

I am trying to encode/decode MIME headers in Ruby.

From stackoverflow
  • Ruby has Base64 methods in core, just do

    require "base64"
    

    and use Base64.decode64 and Base64.encode64. For quoted-printable, you could use the following code here.

  • If the mime content is related to emails you might also want to check out TMAil...

    http://tmail.rubyforge.org/

    It has a nice approach to parsing out email attachments and multi-part messages and what not.

0 comments:

Post a Comment