On 07.12.2010, at 00:25, [email protected] wrote:
> Author: matt
> Date: 2010-12-06 15:25:52 -0800 (Mon, 06 Dec 2010)
> New Revision: 7968
> Log:
> Ooops, Fl_Text_Buffer::insertfile must read in binary format, or it will 
> screw up line endings! (Actually, this could be debated, but by reading and 
> writing in binary format, the file integrity would remain)

Hmm, sorry, no, that doesn't work. :-(

Internal format is <lf> (\n, aka newline) as record terminator,
and if I open a Windows text file on Windows (with cr/lf
line termination), it shows up with the embedded <cr> rendered
as an unprintable character at the end of each line. That looks
very bad and is unusable for native Windows users. Note that
using 'binary' reading is relevant only for Windows, anyway.

If you edit this file, it's even worse: all inserted lines have
lf-only termination and will be written to the file as-is. The
resulting file is unusable in Windows' notepad.

I'm afraid we can't "sell" ;-) this to Windows users.

We should at least be able to read and write the native format
on each platform.

Note: tested with FLTK 1.1: editor works "correctly", reading files
with lf only and cr/lf line endings, but converts the output to
cr/lf for all lines (including those that didn't have cr).
Personally I would favor the latter (minor) misbehavior over
that of current FLTK 1.3.

Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to