fix receiving mail subject broken which does not begin with encoding name (#12375)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10812 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -377,7 +377,8 @@ class MailHandler < ActionMailer::Base
|
||||
# try to reencode to utf8 manually with ruby1.8
|
||||
begin
|
||||
if h = email.header[:subject]
|
||||
if m = h.value.match(/^=\?([^\?]+)\?/)
|
||||
# http://tools.ietf.org/html/rfc2047#section-4
|
||||
if m = h.value.match(/=\?([^\?]+)\?[BbQq]\?/)
|
||||
subject = Redmine::CodesetUtil.to_utf8(subject, m[1])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user