Patch #2059
closedbroken subject when submitting issue via email written in japanese
0%
Description
TMail class in ActionMailer::Base decodes subject to ISO-2022-JP when the subject is written in Japanese. But it should be utf8 when set to issue.subject. As a result, we get broken subject like the attached picture.
Files
Updated by Jean-Philippe Lang about 16 years ago
- Status changed from New to Closed
Patch applied in r1990. Thanks.
Updated by Nobuhiro IMAI about 15 years ago
- File mail_hander_broken_attachment_filename.diff mail_hander_broken_attachment_filename.diff added
- Status changed from Closed to Reopened
The same problem is on the filename of attachment files.
Attached patch fixes this in a similar way to mail_hander_broken_subject.diff.
However, I wonder where the String#toutf8 method came from.
Only kconv.rb (bundled in Ruby 1.8 series) defines String#toutf8,
and Redmine does not require this library, as far as I know.
Just in case, toutf8 from kconv uses nkf internally,
NKF.nkf decodes MIME encoded string automatically.
>> NKF.nkf("-w", "=?iso-2022-jp?B?GyRCJCIkJCQmJCgkKhsoQg==?=") => "あいうえお" >> "=?iso-2022-jp?B?GyRCJCIkJCQmJCgkKhsoQg==?=".toutf8 => "あいうえお" >> NKF.nkf("-w", "=?utf-8?Q?=E3=81=82=E3=81=84=E3=81=86=E3=81=88=E3=81=8A?=") => "あいうえお" >> "=?utf-8?Q?=E3=81=82=E3=81=84=E3=81=86=E3=81=88=E3=81=8A?=".toutf8 => "あいうえお"
Updated by Ignacio Carrera about 15 years ago
@Nobuhiro, please read #3717 (my comment specifically).
This change broke other non-JP and non-English encodings, plus I believe that TMail was handling your subject correctly (the problem may lie elsewhere).
-- nachokb
Updated by Ignacio Carrera about 15 years ago
Ignacio Carrera wrote:
@Nobuhiro, please read #3717 (my comment specifically).
This change broke other non-JP and non-English encodings, plus I believe that TMail was handling your subject correctly (the problem may lie elsewhere).
-- nachokb
Jean Philippe seems to have fixed it in sandbox some months ago...
Updated by Toshi MARUYAMA over 9 years ago
- Related to deleted (Defect #4608: Mail attachment name encoding is incorectly handled)
Updated by Toshi MARUYAMA over 9 years ago
Original issue is fixed.
#2059#note-2 is duplicate of #4608.
Updated by Toshi MARUYAMA over 9 years ago
- Status changed from Reopened to Closed