On Wed, 9 Sep 2009, Ganesh Sittampalam wrote:

On Wed, 9 Sep 2009, Eric Kow wrote:

On Tue, Sep 08, 2009 at 20:12:25 +0100, Ganesh Sittampalam wrote:

That's correct (well, once we've dropped support for 6.10, which I guess
is a couple of years off). One thing we need to check for is that we're
not doing openFile rather than openBinaryFile on a binary file and then
expecting to get back a list of Chars that are actually Word8 - because
that assumption will suddenly break - but it's unlikely we are doing that
given that it would also break line-ending characters on Windows if we
did.

Would we not need to be doing openBinaryFile on all files text and
binary alike?

[I'm assuming we need to retain the behaviour of being completely
 encoding agnostic wrt to file contents except for expecting
 newlines]

Ugh, yes. How annoying, since we'll now manually have to handle the newline issue.

I belatedly realised after my GHC 6.12 patches were accepted that we didn't do anything about this problem. But some experiments and a cursory glance over the source code make me think that we always deal with files in binary mode so there are no issues with encodings. [All we do wrt newlines is to split on '\n', so nothing changes here either AFAIK.]

Ganesh
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to