[FileAPI, common] UTF-16 to UTF-8 conversion

BlobBuilder.append(text) says:

> Appends the supplied text to the current contents of the BlobBuilder,
writing it as UTF-8, converting newlines as specified in endings.

It doesn't elaborate any further.  The conversion from UTF-16 to UTF-8 needs
to be defined, in particular for the edge case of invalid UTF-16
surrogates.  If this is already defined somewhere, it isn't referenced.

I suppose this would belong in "Common infrastructure", next to the existing
section on UTF-8, not in FileAPI itself.

-- 
Glenn Maynard

Received on Thursday, 22 September 2011 23:41:20 UTC