vmail 2.5.9 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vmail/showing_message.rb +8 -3
- data/lib/vmail/version.rb +1 -1
- metadata +1 -1
@@ -61,9 +61,14 @@ module Vmail
|
|
61
61
|
headers = format_headers headers_hash
|
62
62
|
# replace the date value with the one derived from the envelope
|
63
63
|
body = formatter.plaintext_part
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
if /charset=(.*)\s/.match(parts_list)
|
65
|
+
conv_from = /charset=(.*)\s/.match(parts_list)[1].strip
|
66
|
+
body.force_encoding conv_from
|
67
|
+
body = body.encode!('utf-8', undef: :replace, invalid: :replace)
|
68
|
+
else
|
69
|
+
body.force_encoding "utf-8"
|
70
|
+
body = body.encode!('us-ascii', undef: :replace, invalid: :replace)
|
71
|
+
end
|
67
72
|
message_text = <<-EOF
|
68
73
|
#{message_id} #{number_to_human_size message.size} #{message.flags} #{parts_list}
|
69
74
|
#{divider '-'}
|
data/lib/vmail/version.rb
CHANGED