W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: File API Feedback

From: Arun Ranganathan <arun@mozilla.com>
Date: Tue, 28 Jul 2009 15:02:29 -0700
Message-ID: <4A6F7575.6090008@mozilla.com>
To: Nigel Tao <nigel.tao.gnome@gmail.com>
CC: public-webapps@w3.org
Nigel Tao wrote:
> I'm jumping in late to the mailing list, so I might have missed
> something said earlier...
> What happens if you call fileData.getAsText on a file whose contents
> are not valid unicode text (either UTF-8, UTF-16, or some other
> encoding)? For example, I presume that a significant fraction
> JPEG-encoded images aren't valid UTF-8. None of the three FileError
Implementations are expected to determine what encoding to use; in the 
above case, implementations are expected to use U+FFFD replacement 
characters, which isn't at all ideal for contents that are not valid 
unicode text.  I'm adding other asynchronous getters for FileData 
contents (getAsBinary, getAsBase64). 

Previous feedback has also shown that error codes are insufficient as 
currently specified.

-- A*
Received on Tuesday, 28 July 2009 22:14:04 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:18 UTC