[Bug 16733] Drop 'endings'?

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

Glenn Maynard <glenn@zewt.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glenn@zewt.org

--- Comment #1 from Glenn Maynard <glenn@zewt.org> 2012-04-13 15:16:32 UTC ---
> by checking navigator.platform.substr(0, 3) == 'Win' and then a simple replace().

That takes some extra hoop jumping if the source is another Blob or an
ArrayBuffer, though.  It's also potentially a lot harder if the source is a
very large, disk-backed Blob, where you explicitly don't want to pull the whole
thing into memory.

FYI, converting only on Windows wouldn't be a good thing to do: not only may
Windows users load text files with Unix line endings (which wouldn't be harmed
by that), but Linux users can load text files with Windows line endings.  It
would result in strange asymmetries, where both types of files would work for
Windows users, but not for anyone else.  When reading files that you don't plan
to write back out, you're usually best off *always* performing CRLF conversion,
so all text files always work regardless of platform.

-- 
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 15:16:40 UTC