Closed Bug 369067 Opened 18 years ago Closed 16 years ago

Header (sender) characters not in selected encoding

Categories

(Thunderbird :: Message Compose Window, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 378856

People

(Reporter: tomasstraupis, Assigned: mscott)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1 Build Identifier: Thunderbird 1.5.0.9 (Windows/20061207) If thunderbird detects any characters in a message body, which are not in selected encoding, it suggests changing encoding prior to sending. This validation is not performed for message headers (for example for sender). So if message subject/body contains only ascii characters and selected encoding is ISO-8859-1 Thunderbird does not ask to change encoding for sender, even if sender name contains non ascii characters. Reproducible: Always Steps to Reproduce: 1. Select ISO-8859-1 as default encoding for outgoing mail (in tools->options->display). 2. Change Your name to something, that would include non ascii characters. 3. Create new message with ONLY ascii characters in both message body and subject. 4. Send message (no warning is displayed). 5. Check the message either in sent folder either send message to Yourself. Expected Results: Either: 1. There should be possibility to specify character encoding for "Your name". 2. Thunderbird should warn that sender (or other header text) contains characters not in selected character encoding.
Version: unspecified → 1.5
So what is the actual bug here? Is the header sent out in a form that's not readable? It doesn't matter whether the header and body have the same charset, because the message's charset isn't supposed to be applied to headers in the first place; headers are encoded with "MIME encoding" (RFC 2047) and specify their own charset.
Problem is that header is sent out with encoding not matching actual text: for example header encoding is iso-8859-1 while header text includes some non iso-8859-1 characters. This means we get unreadable header text without warning a user about that. This problem is solved for body text by asking user if he would like to change encoding to for example uft-8. This could/should also be done for header. (Or there should be a possibility to specify encoding for "Your name" in options).
(In reply to comment #2) > This means we get unreadable header text Could you post an example of this incorrect header? Select the message, select the menu item View|Source, copy the bad header from the source window, and paste it here.
<...cut...> Date: Fri, 02 Feb 2007 11:00:09 +0200 From: =?ISO-8859-1?Q?Vilius_=C8iulada?= <qqqqqqqqqqqqq@it.lt> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: zzzzzzzzzzzzzzzz@it.lt Subject: WEBUTILS ON tia SERVERS (2) References: <NEBBJIAPPKAEMCDGCFHDEEALNJAA.qqqqqqqqqqq@it.lt> In-Reply-To: <NEBBJIAPPKAEMCDGCFHDEEALNJAA.qqqqqqqqqqq@it.lt> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit <...cut..> First letter of a second word is C with asterisk. But it cannot be displayed correctly for iso-8859-1 encoding. If another default encoding for outgoing messages is chosen (for example iso-8859-13 or utf-8) everything is ok.
> From: =?ISO-8859-1?Q?Vilius_=C8iulada?= <qqqqqqqqqqqqq@it.lt> > ... > First letter of a second word is C with asterisk. I'm not sure which character you mean. Č (C with caron) is 'C8' in the Windows Central Europe charset. So I'm guessing that you're expecting Vilius Čiulada but getting Vilius Èiulada With TB 1.5, I can create an identity for "Vilius Čiulada" and it displays as I expect. When I try to send a message from that identity with only ASCII characters and a default encoding of ISO-8859-1, I get asked if the message the message should be sent as UTF-8 -- which you say (in comment 0) you're not seeing. If I respond Send in UTF-8, the header is sent out as: From: =?UTF-8?B?VmlsaXVzIMSMaXVsYWRh?= <yyyyyyy@xxx.com> which decodes and displays as expected. If instead, I click Send Anyway at the prompt, I'm seeing the header sent as: From: =?windows-1252?Q?Vilius_C=28iulada?= <yyyyyyy@xxx.com> ("windows-1252" is the default fallback encoding for ISO-8859-1). This is basically a hack -- the "=28" maps to an open-parenthesis -- so the expected decoding would be Vilius C(iulada <yyyyyyy@xxx.com> (Unfortunately, there's a bug in Mozilla's handling of MIME-encoded headers -- bug 254519 -- which causes this header to be displayed only as Vilius C ) But I can't figure out how to reproduce the symptom you're seeing. Under Tools | Options | Advanced | General select "Config Editor..." In the 'filter' field of the window, enter "fallback"; you should see a listing for the preference "intl.fallbackCharsetList.ISO-8859-1". What is the value of that preference?
Yes, I did mean "Č". You are correct about what I'm expecting and what I'm getting. Sorry for not being detailed enough. I've retried the same scenario with a number of different settings (changing list of active encodings, plaintext/html messages, disabling enigmail etc.) and still was not asked to change encoding to UTF8. And after that message headers were always sent in iso-8859-1, just slightly different from example in comment #4 (that message was not sent by me). I got this: From: =?ISO-8859-1?Q?Vilius_C=28iulada?= <xxxxxxxx@xxx.com> So C=28 instead of =C8, but still incorrect. My value for intl.fallbackCharsetList.ISO-8859-1 is the default one - "windows-1252".
(In reply to comment #6) > I've retried the same scenario with a number of different settings (changing > list of active encodings, plaintext/html messages, disabling enigmail etc.) > and still was not asked to change encoding to UTF8. > > My value for intl.fallbackCharsetList.ISO-8859-1 is the default one - > "windows-1252". OK, that's one bug -- with that fallback, you definitely should be seeing the prompt. > And after that message headers were always sent in iso-8859-1, just slightly > different from example in comment #4 (that message was not sent by me). I got > this: > > From: =?ISO-8859-1?Q?Vilius_C=28iulada?= <xxxxxxxx@xxx.com> > So C=28 instead of =C8, but still incorrect. This implies that you're seeing the same results as if you'd clicked Send Anyway at the prompt (and, had no fallback for ISO-8859-1). "C(" is part of a make-do encoding that tries to map various Unicode characters onto pairs of ASCII characters -- for instance, ñ -> "n~". In this case, the '(' is causing a problem. That's another bug. (There's probably a similar bug with ç => "c," due to the ',' in an address field.) So changing that would be another bug. But then there's the original incorrect encoding from comment 4. Since you didn't send that message, we don't know anything about how it was created; we don't even know what string was entered when the identity was created. Does *he* see the "Send in UTF-8" prompt? Does *he* have a different fallback?
I sent all details of that first incorrect message in comment 4. I cut upper part, because that was mozilla specific information. I also cut message body, because that was just a plain text. I can recreate the same situation on my Thunderbird, so I guess it does not matter if original guy gets a prompt (or am I wrong?). What I do: 1. Change character encoding for outgoing mail to iso-8859-1 (originally it was windows-1257). 2. Go to Tools-AccountSettings, and in one of accounts change "Your name" from my name "Tomas Straupis" to "Vilius Čiulada". 3. I then create a new message, enter manually my email address to "to" field. 4. Enter "test" as subject and "test" as body (my Thunderbird is set up to compose plain text messages). 5. I press "Send" button. 6. Message is sent (no prompt). 7. I then paste whole message source from folder "Sent" (email addresses changed): From - Wed Feb 07 07:28:24 2007 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00800000 Message-ID: <45C96377.1030202@it.lt> Date: Wed, 07 Feb 2007 07:28:23 +0200 From: =?ISO-8859-1?Q?Vilius_C=28iulada?= <xxxxx@yyyy.com> Organization: IT User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: xxxxxx@yyyy.com Subject: test Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit test
Which locale/language is Windows configured for on your system?
Locale is Lithuanian.
I confirm this problem. It is also a regression. TB in feisty used to work correctly. It must have been something 1.5 or earlier. Quoting https://bugs.launchpad.net/ubuntu/+source/mozilla-thunderbird/+bug/145429 "Version 1.5 of Thunderbird in feisty used to warn me when I tried to send a mail to my friend 武, for example, that the character cannot be encoded in my standard ISO-8859-1 encoding and whether I want to send the mail in UTF-8. The latest version in gutsy (version 2.0.0.6 (20070924)) fails to do that and just sends the message which results in the name being replaced by question mark(s)."
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Version: 1.5 → 2.0
This is a dup of bug 378856.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.