149 |
new_str << sprintf('=%02X', byte) |
new_str << sprintf('=%02X', byte) |
150 |
end |
end |
151 |
end |
end |
152 |
new_str |
'=?UTF-8?Q?' + new_str + '?=' #' |
153 |
end |
end |
154 |
end |
end |
155 |
|
|
497 |
body << "\r\n" if bug[f.name][-1] != ?\n |
body << "\r\n" if bug[f.name][-1] != ?\n |
498 |
end |
end |
499 |
|
|
500 |
|
debug("body = #{body.inspect}") |
501 |
body.strip! |
body.strip! |
502 |
|
|
503 |
if us_ascii?(body) |
if us_ascii?(body) |
505 |
text.header['Content-Type'] = 'text/plain; charset=US-ASCII' |
text.header['Content-Type'] = 'text/plain; charset=US-ASCII' |
506 |
text.header['Content-Transfer-Encoding'] = '7bit' |
text.header['Content-Transfer-Encoding'] = '7bit' |
507 |
else |
else |
508 |
text.body = body.to_a.pack('M*') |
text.body = [body].pack('M*') |
509 |
text.header['Content-Type'] = 'text/plain; charset=UTF-8' |
text.header['Content-Type'] = 'text/plain; charset=UTF-8' |
510 |
text.header['Content-Transfer-Encoding'] = 'quoted-printable' |
text.header['Content-Transfer-Encoding'] = 'quoted-printable' |
511 |
end |
end |
512 |
|
|
513 |
|
debug("text.body = #{text.body.inspect}") |
514 |
|
|
515 |
if bug.has_attachment? |
if bug.has_attachment? |
516 |
file = RMail::Message.new |
file = RMail::Message.new |
517 |
content_type = bug.attachment.content_type |
content_type = bug.attachment.content_type |