Closed Bug 408801 Opened 17 years ago Closed 17 years ago

email subject is truncated if text was wrapped in the middle of a multi-byte character

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bugzilla, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: version 3.0a1pre (2007121703)

An email having a multi-byte encoded subject header (for example UTF-8) is displayed truncated if the subject is wrapped in the middle of a multi-byte character. 

Reproducible: Always

Steps to Reproduce:
Any Thunderbird installation, tried on Mac, Windows 2000 and Windows XP. I have checked latest nightly buid on Windows XP. An email is necessary with the following subject:

Subject: =?UTF-8?Q?=C3=9Cdv=C3=B6z=C3=B6lj=C3=BCk_a_3._Budapest_Fringe_Fesztiv=C3?=  =?UTF-8?Q?=A1l_jelentkez=C5=91it!?=
Actual Results:  
Displayed subject is Üdvözöljük a 3. Budapest Fringe Fesztiv�

Expected Results:  
Expected subject is Üdvözöljük a 3. Budapest Fringe Fesztivál jelentkezőit!

Hungarian accented character 'á' is represented as C3 A1 bytes, in quoted-printable encoding this is =C3=A1. It was wrapped to two parts. Thinderbird decodes the first part, the string ends with C3, this is not a correct UTF-8 character, decoder places a '?' mark in a diamond that means an incorrect character.

Thundrbird does this (causing error):
1. decodes first Q-encoded part
2. interprets the part (!) as UTF-8
3. looks for other parts and concatenates results

Good way to decode this:
1. decode all Q-encoded parts first
2. concatenate them
3. interpret the whole string as UTF-8
Are you sure that subject is correctly encoded? Is it legal for the encoding to break up one character to two parts? 
(I can send a mail with that subject in thunderbird and receive it correctly.)
RFC 2047 clearly says;
> http://www.faqs.org/rfcs/rfc2047.html
>  The 'encoded-text' in an 'encoded-word' must be self-contained;
>  'encoded-text' MUST NOT be continued from one 'encoded-word' to another.

INVALID.

> X-Mailer: PHPMailer (phpmailer.sourceforge.net) [version 2.0.0 rc3]

Probably bug of PHPMailer.

To bug opener:
Report problem to PHPMailer project please, instead of bugzilla.mozilla.org, if the mail is really generated by PHPMailer.
->INVALID per previous comment. Please report the bug to PHPMailer.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: