Open Bug 335342 Opened 18 years ago Updated 2 years ago

provide better NS_NewStringInputStream

Categories

(Core :: XPCOM, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: darin.moz, Unassigned)

Details

provide better NS_NewStringInputStream

NS_NewStringInputStream currently decimates the input string to produce a byte array.  It should probably do something smarter, such as converting to UTF-8 or simply producing a byte array of UTF-16 (w/ platform endianness).

See bug 335298, where extra work was required to deal with the current API.
The thing I was complaining about even more, though, was that I'd like something that's usable from Javascript -- i.e., a way of creating a channel from string data in JavaScript that actually doesn't destroy data, that's just as easy as the way that does destroy data.  For example, a method on nsIStringInputStream or a new interface, that used AUTF8String arguments.
you can use http://lxr.mozilla.org/seamonkey/source/intl/uconv/idl/nsIScriptableUConv.idl#91 for that purpose, can't you? that even allows you to specify the desired charset.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.