Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1105 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 7b37c779
*SVN*
* Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]
*0.8.1* (27th March, 2005)
* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com]
......
......@@ -9,7 +9,8 @@ def subject(to_charset = 'utf-8')
end
def unquoted_body(to_charset = 'utf-8')
Unquoter.unquote_and_convert_to(quoted_body, to_charset, header["content-type"]["charset"])
from_charset = header['content-type']['charset'] rescue 'us-ascii'
Unquoter.unquote_and_convert_to(quoted_body, to_charset, from_charset)
end
def body(to_charset = 'utf-8', &block)
......@@ -97,4 +98,4 @@ def body
end
end
end
end
\ No newline at end of file
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册