Re: Ready for testing: Unicode support for Handle I/O

2009-02-04 Thread Paolo Losi



Max Vasin wrote:

Wouldn't  it be more correct to separate binary IO, which
return [Word8] (or ByteString) and text IO which return
[Char] and deal with text encoding? IIRC that was done in
Bulat Ziganshin's streams library.


That's exactly what I meant.

Text IO could be then implemented on top of binary IO.

Would it be possible to envision a solution that enables
composition of IO low level strategies vs binary - text
conversion strategies?

Pao

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Ready for testing: Unicode support for Handle I/O

2009-02-04 Thread Paolo Losi

Simon Marlow wrote:


The only change to the existing behaviour is that by default, text IO
is done in the prevailing encoding of the system.  Handles created by
openBinaryFile use the Latin-1 encoding, as do Handles placed in
binary mode using hSetBinaryMode.


wouldn't be semantically correct for a binary handle
to return [Word8]?

also switching from text to binary (hSetBinaryMode)
doesn't seem natural

I understand that this has heavy consequences...

Pao

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users