https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-07-07T06:31:20ZRedmineRedmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=100632009-07-07T06:31:20ZStanislav German-Evtushenko
<ul></ul><p>Here subject is for example:<br /><pre>
Re: =?utf-8?Q?=5b=d0=97=d0=b0=d1=8f=d0=b2=d0=ba=d0=b8_=d0=b2_=d0=be=d1=82=d0=b4=d0=b5=d0=bb_IT_=2d_=d0=97=d0=b0=d1=8f=d0=b2=d0=ba=d0=b0_=23=39=36=5d_=d0=97=d0=b0=d0=ba=d0=b0=d0=b7_=d0=b2_=d0=bf=d1=80=d0=be=d0=b8=d0=b7=d0=b2=d0=be=d0=b4=d1=81=d1=82=d0=b2=d0=be_=e2=84=96_=38=34?=
</pre></p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=100742009-07-08T05:57:52ZKonstantin Zaitsev
<ul></ul><p>Thank You, for patch</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=101442009-07-13T06:35:42ZAzamat Hackimov
<ul></ul><p>Looks good for me, but I'm going to try also with CJK-langs...</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=101592009-07-14T11:55:20ZStanislav German-Evtushenko
<ul></ul><p>Huh, the problem is still unresolved. Base64 allows to put more chars in subject but there is a limit too. I have done some investigation and here what I found.<br />Thunderbird is doing something like that (it's displayed normaly in groupwise):<br /><pre>
Subject: =?UTF-8?B?0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB?=
=?UTF-8?B?0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YI=?=
=?UTF-8?B?INGC0LXRgdGCINGC0LXRgdGCINGC0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0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIg0YLQtdGB0YIK?=
</pre></p>
<p>or like that (quoted-printable):<br /><pre>
Subject: =?UTF-8?Q?=5b=d0=97=d0=b0=d1=8f=d0=b2=d0=ba=d0=b8_=d0=b2_=d0=be=d1=82=d0=b4=d0=b5=d0=bb_IT_=2d_=d0=97=d0=b0=d1=8f=d0=b2=d0=ba=d0=b0_=23=39=36=5d_=d0=97=d0=b0=d0=ba=d0=b0=d0=b7_=d0=b2_=d0=bf=d1=80=d0=be=d0=b8=d0=b7=d0=b2=d0=be=d0=b4=d1=81=d1=82=d0=b2=d0=be_=e2=84=96_=38=34?=
</pre></p>
<p>Here extraction from RFC 2045 is:<br /><pre>
(5) (Soft Line Breaks) The Quoted-Printable encoding
REQUIRES that encoded lines be no more than 76
characters long. If longer lines are to be encoded
with the Quoted-Printable encoding, "soft" line breaks
must be used. An equal sign as the last character on a
encoded line indicates such a non-significant ("soft")
line break in the encoded text.
Thus if the "raw" form of the line is a single unencoded line that
says:
Now's the time for all folk to come to the aid of their country.
This can be represented, in the Quoted-Printable encoding, as:
Now's the time =
for all folk to come=
to the aid of their country.
This provides a mechanism with which long lines are encoded in such a
way as to be restored by the user agent. The 76 character limit does
not count the trailing CRLF, but counts all other characters,
including any equal signs.
</pre></p>
<p>Could anyone offer right way how to get round this?<br />Does actionmailer code need to be changed or need to write own 'quoted-printable' converter for redmine?</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=114272009-10-16T12:24:42ZKirill Ponomarev
<ul></ul><p>This patch does not resolve the problem for trunk <a class="changeset" title="Fixed: HTML entities displayed when editing an issue note (#3996)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2924">r2924</a>.<br />Can you update it?</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=142892010-02-12T08:43:35ZMaxim Verevkin
<ul><li><strong>File</strong> <a href="/attachments/3189">mailer-long-subject-base64.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3189/mailer-long-subject-base64.patch">mailer-long-subject-base64.patch</a> added</li></ul><p>When Base64.encode64 is applied the result is the string splitted with CRLF. The patch decorates each line with '=?utf-8?B?' prefix and '?=' suffix.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=142932010-02-12T11:49:31ZStanislav German-Evtushenko
<ul></ul><p>Maxim Verevkin wrote:</p>
<blockquote>
<p>When Base64.encode64 is applied the result is the string splitted with CRLF. The patch decorates each line with '=?utf-8?B?' prefix and '?=' suffix.</p>
</blockquote>
<p>Is it necessary to use both patches or just last one?</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=142942010-02-12T15:35:13ZMaxim Verevkin
<ul></ul><p>Only the new patch works well for redmine v0.9.1. It completely solved the issue of unreadable UTF-8 subjects in email notifications for us.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=143052010-02-12T19:46:40ZStanislav German-Evtushenko
<ul></ul><p>Maxim Verevkin wrote:</p>
<blockquote>
<p>Only the new patch works well for redmine v0.9.1. It completely solved the issue of unreadable UTF-8 subjects in email notifications for us.</p>
</blockquote>
<p>Does it for for quoted-printable subjects?</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=143062010-02-12T19:48:29ZStanislav German-Evtushenko
<ul></ul><p>Stanislav German-Evtushenko wrote:</p>
<blockquote>
<p>Maxim Verevkin wrote:</p>
<blockquote>
<p>Only the new patch works well for redmine v0.9.1. It completely solved the issue of unreadable UTF-8 subjects in email notifications for us.</p>
</blockquote>
<p>Does it for for quoted-printable subjects?</p>
</blockquote>
<p>Oh, it seems like it should work :)</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=143122010-02-12T20:39:14ZStanislav German-Evtushenko
<ul></ul><p>Maxim Verevkin wrote:</p>
<blockquote>
<p>When Base64.encode64 is applied the result is the string splitted with CRLF. The patch decorates each line with '=?utf-8?B?' prefix and '?=' suffix.</p>
</blockquote>
<p>Hm, documentation says that only '\n' adds after each 60 chars.</p>
<blockquote>
<p>Encodes a string to its base 64 representation. Each 60 characters of output is separated by a newline character.</p>
</blockquote>
<pre>
ActiveSupport::Base64.encode64("Original unencoded string")
# => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==\n"
</pre><br /><a class="external" href="http://api.rubyonrails.org/classes/ActiveSupport/Base64.html#M001381">http://api.rubyonrails.org/classes/ActiveSupport/Base64.html#M001381</a> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=143132010-02-12T20:58:15ZStanislav German-Evtushenko
<ul></ul><p>Maxim,<br />I got how it works. Sorry for stupid questions.<br />I my point of view it's not good to use hardcoded charset. I think better way is using #{charset}.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=143562010-02-14T07:41:44ZMaxim Verevkin
<ul></ul><p>Stanislav,</p>
<blockquote>
<p>I my point of view it's not good to use hardcoded charset. I think better way is using #{charset}.</p>
</blockquote>
<p>You are quite right here. Sorry, it was a quick patch to fix the annoying issue.</p>
<p>But I think that the right place to fix this issue is ActionMailer.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=246962011-01-31T11:37:21ZSergey Smirnov
<ul></ul><p>I have similar problem with redmine 1.1.0<br />Notification subjects looks" <br />=?utf-8?Q?=5B=D0=A2=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D1=8B=D0=B9_=D0=B4=D0=BB=D1=8F_=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8_e=2Dmail_=2D_=D0=9C=D0=B8=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D1=8F_=23=38=35=5D_=28=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=29_=D0=9F=D1=...<br />It's strange that subject doesn't end with "?=" but with "..." <br />I applied your patches but it didn't help.<br />I guess that long subject is cutted by redmine with "..." <br />Do anybody know this problem.<br />I user russian locale with utf-8 charset.<br />Thanks.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=301322011-06-21T13:50:29ZEvgeniy Evteev
<ul></ul><p>patch not work in ver. 1.2.0<br />Help.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=312012011-08-01T06:24:15ZSoonhyoung An
<ul></ul><p>i have same problem.<br />(redmine 1.2.1)</p>
<p>all mail title over 70(?) bytes was crashed</p>
<p>Help..</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=312452011-08-03T10:13:55ZSoonhyoung An
<ul></ul><p>sorry..<br />it was my mistake that report patch(mailer-long-subject-base64.patch )is not work with 1.2.1</p>
<p>it works very well..</p>
<p>(first patch only extends more char)<br />exact point of source code is before func create_mail<br />and as Stanislav German-Evtushenko commented</p>
<p>s.split.each { |part| @subject << "=?utf-8?B?#{part.strip}?=\r\n" }<br />should be change -><br />s.split.each { |part| @subject << "=?#{charset}?B?#{part.strip}?=\r\n" }</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=324232011-09-22T05:43:10ZMIchael Ermolenko
<ul></ul><p>These patches solved our problem (Redmine v1.2.1).</p>
<p>Is it planned to include these patches into official code?</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=363972012-02-29T10:32:43ZFrédéric Géraud
<ul></ul><p>I've got the same problem. Trouble is, it collides with my Outlook redirection rules which are based on email subject causing horrific mayhem in my inbox :)</p>
<p>Being a Redmine user, not a Redmine administrator, I cannot decide whereas to apply this patch or not. Anyway, I'll try & ask.</p>
<p>It would really be great it it was to be included in your next official release.<br />Thanks a lot.</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=582932014-08-27T02:24:16ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/17752">Defect #17752</a>: mail subject come to unreadable code when it's too long</i> added</li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=582952014-08-27T02:28:42ZToshi MARUYAMA
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Defect</i></li><li><strong>Subject</strong> changed from <i>Unreadable quoted-printable utf-8 subject in some mail clients</i> to <i>Unreadable quoted-printable utf-8 long subject in some mail clients</i></li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=582962014-08-27T02:29:11ZToshi MARUYAMA
<ul><li><strong>Related to</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/17752">Defect #17752</a>: mail subject come to unreadable code when it's too long</i>)</li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=583002014-08-27T02:31:06ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/17752">Defect #17752</a>: mail subject come to unreadable code when it's too long</i> added</li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=583042014-08-27T06:02:33Zlee min
<ul></ul><p>i have just upgrade my redmine server from 1.3.1 to 2.5.2 stable,but mail subject come to unreadable code when it's too long,according to the solvement above,I just do not know what to do since the mailing method has changed</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=583062014-08-27T08:06:59Zlee min
<ul><li><strong>File</strong> <a href="/attachments/12299">mailresult.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/12299/mailresult.png">mailresult.png</a> added</li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=583072014-08-27T08:09:04Zlee min
<ul></ul><p>the subject turn into base64code is caused by gem mail,below is my testing result<br />info about mail</p>
<p>@ [root@redmine test]# gem list mail
* LOCAL GEMS **<br /> actionmailer (4.1.5, 3.2.18)<br /> mail (2.6.1, 2.5.4)@<br />my ruby test script:sendm.rb</p>
<p>require 'mail'<br />options = { :address => "mail._domain_.com",<br />:port => 25,<br />:domain => 'mail._domain_.com',<br />:user_name => '_<username>_',<br />:password => '_<password>_',<br />:authentication => 'login',<br />:openssl_verify_mode => 'none',}<br />Mail.defaults do<br />delivery_method :smtp, options<br />end<br />Mail.deliver do<br />to '<a class="email" href="mailto:test@domain.com">test@domain.com</a>'<br />from '<a class="email" href="mailto:test@domain.com">test@domain.com</a>'<br />subject '测试标题长度大于80个字节时的表现测试标题长度大于80个字节时的表现测试标题长度大>于80个字节时的表现测试标题长度大于80个字节时的表现测试标题长度大于80个字节时的表现'<br />body 'testing sendmail'<br />end</p>
<p>and then run the command: ruby sendm.rb<br />the subject of the mail has truned<br />=?UTF-8?Q? =E6=B5=8B=E8=AF=95=E6=A0=87=E9=A2=98=E9=95=BF=E5=BA=A6=E5=A4=A7=E4=BA=8E80=E4=B8=AA=E5=AD=97=E8=8A=82=E6=97=B6=E7=9A=84=E8=A1=A8=E7=8E=B0=E6=B5=8B=E8=AF=95=E6=A0=87=E9=A2=98=E9=95=BF=E5=BA=A6=E5=A4=A7=E4=BA=8E80=E4=B8=AA=E5=AD=97=E8=8A=82=E6=...</p> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=758302017-01-11T04:00:51ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/24803">Defect #24803</a>: Incoming mailm subject are truncated </i> added</li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=758322017-01-11T04:03:34ZToshi MARUYAMA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/16859">Defect #16859</a>: rdm-mailhandler: subject corruption</i> added</li></ul> Redmine - Defect #3592: Unreadable quoted-printable utf-8 long subject in some mail clientshttps://www.redmine.org/issues/3592?journal_id=761072017-01-18T19:25:26ZToshi MARUYAMA
<ul><li><strong>Has duplicate</strong> deleted (<i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/24803">Defect #24803</a>: Incoming mailm subject are truncated </i>)</li></ul>