Closed
Bug 246700
Opened 21 years ago
Closed 21 years ago
nsWyciwygChannel should store BOM for its UTF-16 data
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ilya.konstantinov+future, Assigned: jst)
Details
Attachments
(2 files)
|
525 bytes,
text/html
|
Details | |
|
1.46 KB,
patch
|
ilya.konstantinov+future
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
nsWyciwygChannel always uses UTF-16 to store its data (which originates from
document.writes). It also always answers "UTF-16" to GetCharset. However, it
doesn't return a BOM, making it unreliable to detect what kind of UTF-16 it
returns. (Mozilla doesn't necessarily use the platform byte ordering for
conversion from a charset named "UTF-16".)
The solution:
On the first WriteToCacheEntry (the time when mCacheOutputStream is created),
write a single PUnichar of 0xFEFF (the BOM) to the stream. This will allow
Mozilla to recognize the byte ordering this stream was written with.
| Reporter | ||
Comment 1•21 years ago
|
||
Click the button to demonstrate the bug.
| Assignee | ||
Comment 2•21 years ago
|
||
| Assignee | ||
Updated•21 years ago
|
Attachment #150886 -
Flags: review?(mozilla-bugzilla)
| Assignee | ||
Updated•21 years ago
|
Attachment #150886 -
Flags: superreview?(darin)
Comment 3•21 years ago
|
||
Comment on attachment 150886 [details] [diff] [review]
Write out a BOM
seems reasonable to me.
Attachment #150886 -
Flags: superreview?(darin) → superreview+
| Reporter | ||
Comment 4•21 years ago
|
||
Comment on attachment 150886 [details] [diff] [review]
Write out a BOM
Looks cool and solves the bug.
Attachment #150886 -
Flags: review?(mozilla-bugzilla) → review+
| Assignee | ||
Comment 5•21 years ago
|
||
Fixed, thanks for the reviews!
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•