Patches: Browse | Submit New | Admin
Some UTF-8 or other Japanese mails with ActionMailer are broken with NKF's auto characterset detection. This patch give NKF explicit input encoding with $KCODE on mail subject and mail body. Additionaly, patch allows NKF to pass extra options such as '--no-cp932'. class Notifier < ActionMailer::Base self.nkf_options = '-h1 --no-cp932' end This may be useful for more flexible character encodings conversion.
Add A Comment:
Date: 2008-01-28 16:50 Sender: Masao Mutoh I think it's better to set the input encoding with GetText.output_charset, not $KCODE. Basically, the charset of the message body is same as the current charset for output(you can get it from GetText.output_charset). On the other hand, the most important issue is to use NKF. Because it's only for Japanese, and don't work under JRuby. I need to consider again what implementation is good. Thanks.
Date: 2008-01-28 02:04 Sender: Norihito YAMAKAWA Sorry, here's ! It is seems to require '--no-cp932' option for NKF when convert texts involving JIS extend characters such as '0x8740~0x879E', '0xED9F~0xEDFC', extra. So that I made this patch. JIS extend characters are described as below. http://homepage1.nifty.com/~petronius/kana/kakutyaumozi.html
Date: 2008-01-26 17:24 Sender: Masao Mutoh Where is your patch?