[Bug 16733] Drop 'endings'?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16733

--- Comment #7 from Glenn Maynard <glenn@zewt.org> 2012-04-13 18:52:23 UTC ---
If you're receiving a Blob or an ArrayBuffer from an API (like FileReader or
XHR), then you aren't creating the data yourself, so you can't convert line
endings as you create it.

I'm not concerned about supporting that (lacking use cases), so it's probably
fine to shift it into a standalone function.

> Glenn:  Endings converts only output, not input, because this is FileWriter, an
> output API.  If you wanted to convert input, that'd be in
> FileReader.readAsText.  However, it's probably not necessary to add that.

We're talking about the Blob constructor, which isn't part of FileWriter. 
(BlobBuilder wasn't, either...)

> Is there any OS that does not deal with CRLF? Because otherwise we could just
> have "compatible" line endings (CRLF) and "default" (LF).

Some applications do only support text files with native line endings.  Notepad
in Windows, for example, can only load files with CRLF endings.

Also, if we're going to support writing files to the user's native system
(FileWriter and non-sandboxed file access), we should really be able to write
files that conform to the conventions of the user's system.

There's an inherent interop cost here, but it seems unavoidable...

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 13 April 2012 18:52:26 UTC