Last Comment Bug 4029 - Mail- New message always put us-ascii for the Content-type: charset
: Mail- New message always put us-ascii for the Content-type: charset
Product: MailNews Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: All All
P3 normal (vote)
: M5
Assigned To: nhottanscp
: Katsuhiko Momoi
Depends on:
  Show dependency treegraph
Reported: 1999-03-19 10:53 PST by nhottanscp
Modified: 2008-07-31 01:22 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image nhottanscp 1999-03-19 10:53:32 PST
This may be partially related to the restriction of the editor.
New message should put a correct Content-type: charset. Here's a list of things
we need to do.

1) Get a default charset when creating a new message (#3965). Convert the
default to mail charset (#3941) then remember the charset.
2) Update the charset when it's changed by the charset menu.
3) When sending the message, check the sending text and if ascii only then put
us-ascii (it is preferred to use unicode for this check because only range check
required, e.g. iso-2022-jp is 7bit only but not us-ascii).
4) Otherwise, use the remembered  charset for the Content-Type: charset.
5) Use that charset to convert from unicode.
Comment 1 User image nhottanscp 1999-03-19 10:54:59 PST
Target to M4, assign to myself (for now).
Comment 2 User image nhottanscp 1999-03-23 14:29:59 PST
Reassigning to Jean-Francois, I have sent him a diff which includes the code
to get a default charset and usage of the unicode converter.
Task 2) and 3) may be done after M4.
Comment 3 User image Phil Peterson 1999-04-01 14:36:59 PST
JF, can you apply Naoki's patch, and then mark the bug for the milestone in
which you want to fix the other issues.
Comment 4 User image nhottanscp 1999-04-01 14:56:59 PST
I checked in the code, forgot to update the bug.
Comment 5 User image nhottanscp 1999-04-05 15:13:59 PDT
Put a line below, the specified charset will be used for the Content-type:
user_pref("intl.charactesr_set_name", "iso-8859-1");
Comment 6 User image nhottanscp 1999-04-05 15:16:59 PDT
Additional info for my last comment...
Put the line to prefs.js.
Comment 7 User image Katsuhiko Momoi 1999-04-08 16:02:59 PDT
There was a spelling error in the check in.

It really should be:

1. user_pref("intl.character_set_name", "iso-8859-1");

But the 4/5 check in had:

2. user_pref("intl.charactesr_set_name", "iso-8859-1");

Note the "charactesr" which has an extra "s" in it.

If you use 2 rather than 1 in pref.js, the headers go out correctly
as "iso-8859-1", otherwise it is "us-ascii".

I'm going to re-open this because this should not be confusing to
testers and developers who will be using it.
Comment 8 User image nhottanscp 1999-04-08 17:17:59 PDT
I talked to Frank and agreed that this we can specify in the release note. I
will check in the fix for M5.
Comment 9 User image nhottanscp 1999-04-08 17:58:59 PDT
Reassigning to myself. In M5, we also need to hook up charset menu and detect
us-ascii (see my original comment).
Comment 10 User image nhottanscp 1999-04-09 18:03:59 PDT
The pref bug fix was checked in mozilla/mailnews/msgCompGlue.cpp rev 1.21
Comment 11 User image Katsuhiko Momoi 1999-04-12 16:13:59 PDT
** Checked with 4/12/99 Win32 build **

I can now use the correctly spelled name in prefs.js file
and send out iso-8859-1 mail.
The incorrect one no longer works.

This verifies the fix.

Note You need to log in before you can comment on or make changes to this bug.