Closed Bug 15017 Opened 21 years ago Closed 20 years ago
File|Save in editor does not put correct charset in META tag
1. Open Editor 2. Select "character set" menu and change it to some other charset (ISO-2022-JP) 3. Type some Japanese text 4. File:Save The text will be convert correctly in that encoding we select in #2. Howerver, the page always tag with META tag as UTF-8, which conflict with the data it saved. Naoki, tague is pretty doomed about input. And I believe you also did something with META tag generation with Mail/News. Please take care this. Thanks I find this problem when I try to verify bug 12027
> the page always tag with META tag as UTF-8, which conflict with the data > it saved Teruko, is this true for other charsets (e.g Shift_JIS, EUC-JP, MacRoman) or specific to ISO-2022-JP? I checked the data in http://babel/bugs/editor/ (mentioned in 12027) but they don't have META utf-8.
The saved data in babel is old . Try the current build.
I tried Shift_JIS, EUC-JP and ISO-2022-JP, they all got UTF-8 META tag. Also when the new editor document is saved without any change (no text or charset change), it's also saved with UTF-8 META charset (this is correct, the document is UTF-8 in fact). I think the problem is that the original META is not changed by changing the charset menu. Since the charset conversion is already done correctly responding to the menu change, we can update the META charset tag at the same time. Any idea of where in the editor code to look at?
I filed the Meta tag in 12085. Akkana marked this is dup of 7849. From the bug 12085. ------ Additional Comments From email@example.com 09/01/99 16:45 ------- Fixed for the case indicated (which does fix the Save As case mentioned at the top of this bug). ------- Additional Comments From firstname.lastname@example.org 09/08/99 16:16 ------- I tested this in 9-08 Win build. The meta charset whenever I selected menu is in the editor. However, there is an extra meta charset for UTF-8 also. <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>xxxxxxx</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> When I look at this page in the browser, the Japanese characters are not displayed correctly. I need to reopen this bug. ------- Additional Comments From email@example.com 09/10/99 15:16 ------- There are a few problems here and I'm not sure how they should be solved. 1. The reason for the two charsets is that the charset override from the menu doesn't do anything to remove the meta tag node in the document which sets the charset. This seems like a bug, since it leaves us with two conflicting charsets. Overriding the charset should change the meta charset tag in the document if that meta tag is going to cause problems when it's written out. The output sink could potentially hack around this, by trying to detect the existing charset tag if we're overriding, and not output the old charset tag in that case; but the problem is that there are lots of different meta tags, so how do we detect the one we shouldn't be outputting? Doing a string match on anything with "charset" in it seems like the wrong thing to do when we previously had that information accessible in the tree. I need some input from people who understand meta tags and charsets better than I do. --------------------------------------------------------------------------
According to Teruko's comment, there were more than one META charset in one html. When I tested yesterday, the output html only had one META but it was always UTF-8. I don't know if internally it still has multiple META. But as Akkana mentioned "Overriding the charset should change the meta charset tag".
When I worked on the other bug, 2 meta tags are in the page. However, now I see one meta tag in the page. I created new page from File|Save in the editor to \\Babel\Babel_Docs\editor\new directory.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
I checked in the fix yesterday. Now an existing META charset tag is replaced by charset menu selection. No META is created for htmls with no META. This should be filed separately. There is also a related issue about the page property (if META is disabled there then we shouldn't create META). I posted a question about the page property to the newsgroup but haven't got answer.
I tested this in 10-28-08 Win32, Linux, and 10-28-10 Mac build. The page after you saved in the Editor does not contain Meta charset.
Adding 17495 to depend. Save as is broken, I don't think this particular feature is broken.
The Save As problem is bug 15764.
Status: REOPENED → RESOLVED
Closed: 21 years ago → 20 years ago
Resolution: --- → FIXED
SaveAs is now working again.
Correcting dependency 15764 -> 15674.
I verified this in 110408 Linux, Win32, and Mac build.
You need to log in before you can comment on or make changes to this bug.