Closed
Bug 230440
Opened 21 years ago
Closed 8 years ago
Remove NS_NewStringInputStream and 'fix' callers
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
DUPLICATE
of bug 1240436
People
(Reporter: Biesinger, Unassigned)
References
()
Details
(Keywords: intl, Whiteboard: [necko-would-take])
Streams are streams of bytes, not of characters. This makes it seem like a bad
idea to support creating one from an nsACString: it is unclear what the encoding
will be and just generally makes no sense.
the current implementation is also somewhat useless :) (truncates the characters
to the lower 8 bits)
Comment 1•21 years ago
|
||
You mean nsAString, not nsACString, right? Creating a byte stream from
nsACString has no issues...
| Reporter | ||
Comment 2•21 years ago
|
||
er, yeah. nsAString.
Comment 3•21 years ago
|
||
I guess removing it should be done together with fixing callers. With that
change, this bug blocks 230275. In its place, we might want to have
NS_NewUTF8StringInputStream.
One particularily bad caller of this is nsRDFXMLParser::ParseString, which takes
a nsString argument, and then sets the charset to UTF8. i.e., it expects you to
pass in UTF8 in a nsString as it stands.
Comment 5•21 years ago
|
||
Yes, we know. That's why this bug blocks bug 230275.
Updated•19 years ago
|
Assignee: darin → nobody
QA Contact: benc → networking
Updated•9 years ago
|
Whiteboard: [necko-would-take]
Fixed by:
https://hg.mozilla.org/mozilla-central/rev/f851d6d56143
Bug 1240436 - Part3: Remove NS_NewStringInputStream to prevent misuse. r=froydnj
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•