Closed Bug 369392 Opened 18 years ago Closed 17 years ago

Composer declares wrong encoding

Categories

(SeaMonkey :: Composer, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: glandium)

References

Details

(Keywords: fixed-seamonkey1.1.7, fixed-seamonkey1.1.8, relnote)

Attachments

(1 file)

Attached patch patchSplinter Review
(this was first reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=408220 ) If you create a new document and look at the source code, you see in the meta tag that the content is supposed to be iso-8859-1. Take a look in the View -> Character Encoding menu and you'll see UTF-8 is selected. Add some non latin characters (like €), and save the document, when you save the document without changing the output encoding (default being UTF-8), it will correctly save an UTF-8 file (which you can check with something like isutf8), but it will still contain the iso-8859-1 indicating meta tag. Now try to save again in UTF-8 but after choosing another encoding, and the meta tag will be updated. The fact is the encoding for the meta tag is decided from the intl.charset.default (which is l10n dependant). OTOH, the document encoding is always UTF-8. The document encoding needs to be changed at creation time to fit that of the intl.charset.default pref. See the attached patch.
Attachment #254061 - Flags: review?(ajvincent)
Comment on attachment 254061 [details] [diff] [review] patch r=ajvincent (glazou has authorized me as module owner to be a peer for ui changes)
Attachment #254061 - Flags: superreview?(neil)
Attachment #254061 - Flags: review?(ajvincent)
Attachment #254061 - Flags: review+
I don't know if this is related, but if I copy text from another file (e.g., MS Word) into the Composer it'll correctly display m-dashes, left and right quotes (single and double), .... But if you close the HTML file, and reopen it, it will now display those characters as gibberish.
Neil, can you sr?
Assignee: daniel → mh+mozilla
Comment on attachment 254061 [details] [diff] [review] patch Things are worse still on trunk, because bug 331991 serialises the meta tag according to the actual character set, so it ignores the default.
Attachment #254061 - Flags: superreview?(neil) → superreview+
Mike, does this patch still apply to trunk?
(In reply to comment #5) > Mike, does this patch still apply to trunk? It looks like it does. http://mxr.mozilla.org/mozilla/source/editor/ui/composer/content/editor.js#2477
Blocks: 306312
Keywords: relnote
OS: Linux → All
Attachment #254061 - Flags: approval-seamonkey1.1.6?
Blocks: 306310
No longer blocks: 306312
Comment on attachment 254061 [details] [diff] [review] patch do I need approval for trunk, too?
Attachment #254061 - Flags: approval-seamonkey2.0a1?
Comment on attachment 254061 [details] [diff] [review] patch yes, let's do this, it sounds safe for branch. a=me
Attachment #254061 - Flags: approval-seamonkey1.1.6? → approval-seamonkey1.1.6+
Keywords: checkin-needed
Comment on attachment 254061 [details] [diff] [review] patch trunk SeaMonkey-specific code doesn't need approval at the moment, clearing 2.0a1 flag.
Attachment #254061 - Flags: approval-seamonkey2.0a1?
Checking in editor/ui/composer/content/editor.js; /cvsroot/mozilla/editor/ui/composer/content/editor.js,v <-- editor.js new revision: 1.247; previous revision: 1.246 done When I'm sure what branch I'm supposed to land this on, I'll do the branch check-in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
MOZILLA_1_8_BRANCH: Checking in editor/ui/composer/content/editor.js; /cvsroot/mozilla/editor/ui/composer/content/editor.js,v <-- editor.js new revision: 1.235.2.4; previous revision: 1.235.2.3 done
Keywords: checkin-needed
Depends on: 400372
Component: General → Composer
Product: Composer → Mozilla Application Suite
Version: 1.0 → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: