Closed Bug 169761 Opened 22 years ago Closed 20 years ago

The Character Coding become "Western" if you save a new message as draft

Categories

(MailNews Core :: Internationalization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: foripepe, Assigned: nhottanscp)

References

Details

(Keywords: intl)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910

Write and save a new message with special Character Coding (for example Central
European). Let the message body without (!) special characters (for example
"Ξ±űőΟŠΟ†ΟŒΟƒ"). You use only western characters (a-z) in the body. Close the massage.
You open it next time from the "Drafts". You will see that the Character Coding
becam Western.

No matter if the "To:" or the "Subject:" has special characters or not.
No matter if you use:
Save (CTRL+S) or
click File / Save or
click File / Save as / Draft or
click File / Save as / Template.

Reproducible: Always

Steps to Reproduce:
1. Open a new message (CTRL+M)
2. Click: View / Character Coding / Central European (ISO-8859-2)
3. Save (CTRL+S)
4. Close (CTRL+W)
5. Click "Drafts", and click this message
6. Click View / Character Coding and you will see: Western (ISO-8859-1)
Peter, are those message Mime encoded? Do they have MIME in the headers or body?
Or both? Or they are non-mime messages? Could you please attach a sample? Thanks.
Component: Localization → Internationalization
> Peter, are those message Mime encoded? Do they have MIME in the headers or body?
> Or both? Or they are non-mime messages? Could you please attach a sample? Thanks.

My Preferences:
Edit / Preferences / Mail & Newsgroups / Message Display / Languages:
Character Codin: Central European (ISO-8859-2)
NO - Apply default to all messages (ignore character coding specified by MIME
header) ((--- If I checked this the bug stop.))

A sample (empty) message source after save. It has the bug:
=================================================================
From - Fri Sep 20 21:46:37 2002
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
FCC: mailbox://pepe@pop3.tvnet.hu/Sent
Date: Fri, 20 Sep 2002 21:46:37 +0200
From: Pepe <pepe@mail.tvnet.hu>
X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; uuencode=0
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910
X-Accept-Language: en-us, en
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
     
  <meta http-equiv="Content-Type"
 content="text/html;charset=ISO-8859-14">
  <title></title>
  
</head>
<body>
<br>
</body>
</html>
=================================================================

This is another sample. This keep the Central European (ISO-8859-2) Character
Codin, because I wrote some special character in the messsage body before save.
=================================================================
From - Thu Sep 19 23:05:05 2002
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
FCC: mailbox://pepe@pop3.tvnet.hu/Sent
Date: Thu, 19 Sep 2002 23:05:05 +0200
From: Pepe <pepe@mail.tvnet.hu>
X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; uuencode=0
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910
X-Accept-Language: en-us, en
MIME-Version: 1.0
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
           
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-2">
  <title></title>
  
</head>
<body>
kkkΓ©kkkΓ΅ppp
</body>
</html>
=================================================================
The first message has charset us-ascii for headers ( and that would not allow
the headers with central european chars display correctly) but your body charset
is 8859-14..? I don't understand how could that be if you say you enter only
ascii chars..Peter, could you please attach the message itself not paste the
page source? Thanks.
Assignee: rchen → nhotta
Attached file It has the bug. (deleted) β€”
body:
"sample
sample2"
Attached file It's good. (deleted) β€”
body:
"sampleÑéő
sampleÑéő2"
what is your character code setting in your "Preference:Mail & News:Composition" ?
> what is your character code setting in your "Preference:Mail & News:Composition" ?
Central European (ISO-8859-2)
I can confirm this bug for Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4)
Gecko/20030529

Default character coding set in my preferences for e-mail: ISO-8859-2
related: bug 197344
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: The Character Coding become "Western" if you save a new messages → The Character Coding become "Western" if you save a new message as draft
This happens to me also. I have default character set ISO-8859-2 for composing
mail. But if I send the message without special characters the mail gets sent
with us-ascii encoding. This is not correct, but is tolerable (no damage yet).
So far, so good. 
But when a Mozilla Mail client receives such mail, the default reply will be
also in us-ascii, which is of course wrong. So this is the reason why I would
like to keep my coding as I have set it in the preferences even if I don't use
special characters.
Agree with comment #10 !

I just was sending some mail with emty body (just signature) and some pictures
attached. The result looks bad in M$ Outlook (what looks good is another idea).

After some debugging, I came to this bug, as it turned out that Mozilla has sent
the body (t.e. the 1st part of the multipart MSG) in:

Content-Type: text/plain; charset=us-ascii

instead of my default ISO-2022-JP. As a result (and a bug in outlook), the
subject (in Japanese) is displayed wrong in the MSG view in Outlook (but OK in
the MSG list). I know this is a bug in Outlook and not Mozilla per se, but...

I haven't tried the situation in comment #10, but I guess it holds. I just tried
to reply from Outlook and it replies not in Japanese.

Related bug 197344, bug 197346 (dupe), a bit related to bug 204735 (RFE).
*** Bug 238265 has been marked as a duplicate of this bug. ***
As noted in the duplicate, this problem also happens for Edit As New.

The fact that the message is *sent* with a different encoding (us-ascii or 
8859-1) is not in itself a problem.  But when a message is opened into a compose 
window, the encoding should be reset to the user's preference if the characters 
all map.  An example of why this might be a problem:

 - Set compose pref to 8859-2.  Compose a message using only 7-bit chars.  Save 
as Draft and close compose window.
 - Open the message from the Drafts folder into a new compose window.  Header 
shows the encoding as Western/8859-1.
 - Go to the end of the message and type in some characters specific to 8859-2.
 - Send the message.
Result: you're prompted to change the coding.

The encoding specified in the message should be used if the characters used do 
not map into the user's preferred encoding.  For instance, a Big5 message full 
of Chinese characters should remain in the Big5 character set.


Workaround for this bug:  Change the preference value for
  intl.fallbackCharsetList.ISO-8859-1
to
  ISO-8859-2  (or, perhaps better:   ISO-8859-2,UTF-8   )
This setting will specify which character encoding(s) should be tried if the 
message composed as 8859-1 contains characters that don't fit in 8859-1.  The 
conversion will be automatic to the first encoding that matches; if none match, 
then the prompt will be displayed as usual.
*** Bug 197344 has been marked as a duplicate of this bug. ***
I agree with comment #13. We have to fix this bug !

(In reply to comment #10)

The following is a bit off-topic on this bug, but can be related because just
fixing the case when we save to Drafts folder may not be easy.

> if I send the message without special characters the mail gets sent
> with us-ascii encoding. This is not correct, 

  There's nothing incorrect about that behavior. That is by design, but we may
reconsider it if it causes a trouble with other UAs. 

> But when a Mozilla Mail client receives such mail, the default reply will be
> also in us-ascii, which is of course wrong.

 You may be glad to know that there's a new preference entry by which you can
control whether to use your default mail-send encoding or the encoding of the
message you're replying to when replying. IT's set to the encoding of the
message you're replying to by default, but you can change it to the former.
Perhaps, I have to take a look if it's possible to make Mozilla use the default
mail-send character encoding when the encoding of the message you're replying to
is US-ASCII. 
Keywords: intl
OS: Windows 98 → All
Hardware: PC → All
(In reply to comment #15)
> > if I send the message without special characters the mail gets sent
> > with us-ascii encoding. This is not correct, 
> 
>   There's nothing incorrect about that behavior. That is by design, but we may
> reconsider it if it causes a trouble with other UAs. 
> 
> > But when a Mozilla Mail client receives such mail, the default reply will be
> > also in us-ascii, which is of course wrong.
> 
>  You may be glad to know that there's a new preference entry by which you can
> control whether to use your default mail-send encoding or the encoding of the
> message you're replying to when replying. IT's set to the encoding of the
> message you're replying to by default, but you can change it to the former.
> Perhaps, I have to take a look if it's possible to make Mozilla use the default
> mail-send character encoding when the encoding of the message you're replying to
> is US-ASCII. 
I think when sending a message with incorrcet characters (incorrect for current
encoding), it would be more correct to change them for '?' or something like
that than to send a message in a format where only latin characters are seen.
I would prefer Mozilla to warn me that there are incorrect characters in my
message, but if I want to send it anyway, chage only incorrect characters, not
the encoding.

As an example, when I compose a letter in Russian, I have default enconding
KOI8-R. When I paste text from MS Word, it can include charcters from Win1251
codepage that are not in KOI8-R codepage. Mozilla warns me when I try to send a
message, and if I say 'send anyway', encoding is changed without notice. So when
the message is received, there are only latin characters, all my russian
characters are lost (changed for '?'). It's very strange and annoying behaviour.
I would agree to lose characters not from currecnt encoding, but I do not agree
to lose the whole letter. And when I have to send a letter as quick as possible,
I have to search for incorrect characters and delete them by hand. No very
convenient, isn't it?
What you wrote in the previous comment is not so relevant to this bug. (please,
do not abuse 'reply' feature of bugzilla by including the excessive amount of
the previous comment) Moreover, you don't seem to have used Mozilla 1.7beta. In
1.7beta, when your message contains characters outside the current encoding,
you're prompted choose between converting the whole message to UTF-8 and  going
back to the composition.  
I don't know what might have fixed it, but this bug appears to have disappeared 
in Moz 1.8a3-0824.

Peter Forgacs, can you confirm?

Jungshik Shin, do you have any idea why?
*** Bug 176829 has been marked as a duplicate of this bug. ***
I guess it's my fix for bug 247958.
I can confirm it. The bug disappeared.
Marking as Fixed, assuming the patch from bug 247958 did the job.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: