Closed Bug 92473 Opened 23 years ago Closed 23 years ago

Overwrite character set does not work inside Text and Textarea.

Categories

(Core :: Internationalization, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: teruko, Assigned: shanjian)

References

()

Details

(Keywords: intl, Whiteboard: patch available, need r/sr)

Attachments

(4 files)

Overwrite character set does not work inside Text and Textarea.

Steps of reproduce
1. Launch Browser
2. Clean the cash or creat new profile
3. Go to the following urls 
http://babel/tests/browser/html/sjis_no_meta/test-text_sjis.html for text
http://babel/tests/browser/html/sjis_no_meta/test-form_sjis1.html for textarea

Since these page do not have meta charset info, Japanese characters are 
not displayed correctly.

4. Select menu View | Character coding->More->East Asain->Japanese (Shift_JIS)

Actual result,
Inside Text and TextArea, Japanese characters are not displayed correctly.

Expected result,
Inside Text and TextArea, Japanese characters are diaplayed correctly.

Tested 7-25-0.9.2 Win32, Mac, and Linux build.
I tested this in 6.1 PR1.  I could reproduce this.
QA Contact: andreasb → teruko
Summary: Overwrite character set does not work inside Text and Textarea. → Overwrite character set does not work inside Text and Textarea.
Reassign to shanjian.
Assignee: nhotta → shanjian
Keywords: intl
Status: NEW → ASSIGNED
For normal reload or charset reload, the content of text field and textarea are 
preserved. This is an unwanted feature in case of charset reload. I am still 
looking for the place where this preservation is done. 
Attached patch Proposed fix,Splinter Review
Whiteboard: patch available, need r/sr
radha, could you review my fix? That change in nsDocShell.cpp is most sensitive.
thanks!
The patch looks good, as long as it avoids the historystate restoration *only*
for charset change. Please make sure that  form field values are restored for
simple reloads.

r=radha
Yes, for normal reload, text field values are restored.
blizzard, can you sr this one?
sr=blizzard
fix checked in. 
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified as fixed in 8-22 trunk build.
Status: RESOLVED → VERIFIED
Attached file testcase
I imagine the testcase was something like this.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: