rails/rails — Issue #3824: Encoding problem in actionmailer subject
Author: tompat
Created: 2011-12-01 10:48:42+00:00
State: open

When subject is too long (apparently more or less 80 characters), the string is splitted in two lines. If the first line has an UTF-8 characters, it is converted in utf-8, if the second has no UTF-8 characters, it is not converted in UTF-8. The problem is, in this case only, the space between the last word of the first line and the first word of the second line disapears,

Test case:

=== My Email subject: ===
[tag: reset-password] Réinitialisation de votre mot de passe

=== Rails log on email sent (/!\ with exactly the same new line " de passe"): ===
Subject: =?UTF-8?Q?[tag:_reset-password]_R=C3=A9initialisation_de_votre_mot?=
de passe

=== EMail header ===
Subject: =?utf-8?q?_R=C3=A9initialisation_de_votre_motde_passe?=