Defect #5721 » Chinese_attachment_name_garbled.patch
vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail/attachments.rb | ||
---|---|---|
5 | 5 |
=end |
6 | 6 | |
7 | 7 |
require 'stringio' |
8 |
require 'tmail/quoting' |
|
8 | 9 | |
9 | 10 |
module TMail |
10 | 11 |
class Attachment < StringIO |
... | ... | |
31 | 32 |
part['content-location'].body) || |
32 | 33 |
part.sub_header("content-type", "name") || |
33 | 34 |
part.sub_header("content-disposition", "filename") |
34 |
|
|
35 |
file_name = Unquoter.unquote_and_convert_to(file_name, 'utf-8') |
|
35 | 36 |
next if file_name.blank? || content.blank? |
36 | 37 |
|
37 | 38 |
attachment = Attachment.new(content) |
- « Previous
- 1
- 2
- Next »