4
5
6
7
8
9
10
11
12
13
|
# File 'lib/mail/jenc/message_patch.rb', line 4
def body=(value)
if Jenc.enabled?
if value.is_a?(String) && !value.ascii_only? && value.encoding == Encoding::UTF_8 && charset && charset.downcase != 'utf-8' && @transport_encoding.to_s != '8bit'
value = Mail::Encodings.transcode_charset(value, value.encoding, charset)
value.force_encoding('us-ascii') if @transport_encoding.to_s == '7bit' && charset.downcase == 'iso-2022-jp'
value = @transport_encoding.encode(value)
end
end
super
end
|