Closed Bug 230440 Opened 21 years ago Closed 8 years ago

Remove NS_NewStringInputStream and 'fix' callers

Categories

(Core :: Networking, defect)

defect
Not set
normal

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)
You mean nsAString, not nsACString, right? Creating a byte stream from nsACString has no issues...
er, yeah. nsAString.
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.
Blocks: 230275
Keywords: intl
Summary: Remove NS_NewStringInputStream → Remove NS_NewStringInputStream and 'fix' callers
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.
Yes, we know. That's why this bug blocks bug 230275.
Assignee: darin → nobody
QA Contact: benc → networking
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.