email.body
=> "Spanish lowercase i ( ? )"
I have set email encoding as follows:
email.charset
=> "iso-8859-1"
ree-1.8.7-2011.03 :004 > email.transfer_encoding
=> "quoted-printable"
so I am looking into the mail parser,
message.type
=> Mail::Message
ree-1.8.7-2011.03 :033 > message.body
=> #<Mail::Body:0x10bf93308 @preamble=nil, @raw_source="
Communications with Spanish lowercase i ( =ED ) are\r\nbreaking
parsing and truncating email after the symbol", @epilogue=nil,
@part_sort_order=["text/plain", "text/enriched", "text/html"],
@encoding="quoted-printable", @parts=[], @charset="iso-8859-1",
@boundary=nil>
ree-1.8.7-2011.03 :034 > message.charset
=> "iso-8859-1"
as you can see in the rawsource, its has a quoted-printable version of
the char.
Spanish lowercase i ( =ED )
Here is an original string of the body:
Spanish lowercase i ( í )
but when I do
message.decoded
=> " Communications with Spanish lowercase i ( ? ) are\r\nbreaking
parsing and truncating email after the symbol"
message.decode_body
=> " Communications with Spanish lowercase i ( ? ) are\r\nbreaking
parsing and truncating email after the symbol"
it does not decode properly. and by the time it gets to Mail, it shows
like above email.body with ? where Italian small i is. It did not work
when I set charset to "UTF-8" as well.
How can I decode properly? any feedbacks are appreciated.
cheers