W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: XHR responseArrayBuffer attribute: suggestion to replace "asBlob" with "responseType"

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 10 Nov 2010 23:13:34 +0100
To: Jonas Sicking <jonas@sicking.cc>
Cc: David Flanagan <david@davidflanagan.com>, public-webapps@w3.org
Message-ID: <gp5md6d5580i8ojji8mj1bflqvgk8fobje@hive.bjoern.hoehrmann.de>
* Jonas Sicking wrote:
>> In most cases you do not need to store the bytes in order to get them
>> back, you can just apply the character encoding scheme used to decode
>> the bytes to the string and you'll have the original byte string, so
>> long as the character encoding scheme is bijective, which is true for
>> most of the relevant schemes like UTF-8 and UTF-16.
>
>It's not true for UTF-8/UTF-16 if the original streams contain illegal
>surrogates, right? We usually convert those to the replacement
>character in firefox, which is an information destroying operation.
>(I'm not sure if the stream converters do this, but they should)

Yes, I noted that in my message as an example. But using problematic
character encodings and having character encoding errors is becoming
less and less common, so that isn't much of a concern.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 10 November 2010 22:14:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:41 GMT