Proposal: Add concatMapM function (#2042)

Bryan O'Sullivan bos at
Fri Feb 1 12:30:53 EST 2008

Ketil Malde wrote:

> But how about a 'withDefaultEncoding' modifier that
> inspects the first two (or four?) bytes for a Unicode BOM, and either
> sets decoding accordingly and continues, or sets encoding according
> to locale *and* lets the user read the first bytes when reading from
> the handle.

I really don't like the idea of gluing notions of encoding and decoding
to Handles, because Handles are so limited in their usefulness.  Even
something as simple as reading an encrypted file defeats this approach.
 Never mind stream sockets, datagram sockets, memory mapped files, or
any of a dozen other ways of getting data that will have an encoding.


More information about the Libraries mailing list