Need a champion? StringView strawman
rodneyd.teal at gmail.com
Fri Jan 10 14:07:31 PST 2014
I mean char code points in the range (0-255) a byte. Use the desired
terminology or name.
Primarily because of this bug -> Expose raw data on UDP socket messages:
I generate a random string using code points that I eventually convert to
bytes. Specifically in the case of a two or 20 char/byte ID. Where I need
to be able to use the entire 16 bit or 160 space and then send as bytes and
trust that ID will be same for both parties consistently. <-- To elaborate,
I need to bencode this information before converting to bytes. I understand
all of this could be worked around by just using String.charCodeAt or the
synonymous String.codePointAt but why then have such a powerful API and
disallow the fore-mentioned feature?
And why exactly have to separate APIs?
On Fri, Jan 10, 2014 at 3:40 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 1/10/14 4:29 PM, Dwayne wrote:
>> Exactly how StringView handles the option now. If I generate a random
>> string using byte values then each char in that string should correspond
>> to a single byte when specifying the ISO-8859-1.
> OK, so specify ISO-8859-1, if that's what you're really doing. Or are you
> saying that you just want "ascii" to be a synonym for "iso-8859-1" here?
> But it'd be a lie, because ASCII actually means something, and it means
> something different from ISO-8859-1.
> But really, if you just have bytes, not text, why are you generating a
> string from those byte values at all? This is where a typed array would
> make more sense...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss