Closed
Bug 369392
Opened 18 years ago
Closed 17 years ago
Composer declares wrong encoding
Categories
(SeaMonkey :: Composer, defect)
SeaMonkey
Composer
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)
420 bytes,
patch
|
WeirdAl
:
review+
neil
:
superreview+
kairo
:
approval-seamonkey1.1.8+
|
Details | Diff | Splinter 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 1•18 years ago
|
||
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+
Comment 2•18 years ago
|
||
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.
Comment 4•17 years ago
|
||
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+
Comment 5•17 years ago
|
||
Mike, does this patch still apply to trunk?
Comment 6•17 years ago
|
||
(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
Updated•17 years ago
|
Updated•17 years ago
|
Attachment #254061 -
Flags: approval-seamonkey1.1.6?
Updated•17 years ago
|
Comment 7•17 years ago
|
||
Comment on attachment 254061 [details] [diff] [review]
patch
do I need approval for trunk, too?
Attachment #254061 -
Flags: approval-seamonkey2.0a1?
Comment 8•17 years ago
|
||
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+
Updated•17 years ago
|
Keywords: checkin-needed
Comment 9•17 years ago
|
||
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?
Comment 10•17 years ago
|
||
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
Comment 11•17 years ago
|
||
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
Updated•17 years ago
|
Keywords: fixed-seamonkey1.1.6
Updated•17 years ago
|
Component: General → Composer
Product: Composer → Mozilla Application Suite
Version: 1.0 → unspecified
Updated•15 years ago
|
Keywords: fixed-seamonkey1.1.8
You need to log in
before you can comment on or make changes to this bug.
Description
•