
14 Jul
2007
14 Jul
'07
2:20 a.m.
On Sat, Jul 14, 2007 at 12:15:34PM +1000, Donald Bruce Stewart wrote:
wnoise:
On 2007-07-14, Donald Bruce Stewart
wrote: not in base, but see utf8-string on hackage.haskell.org.
Yes, this a decent layering of (2), on top of (1), for GHC only, depending on it to reading the bytes, and interpreting them as Latin-1.
Yeah, we can also layer it on Data.ByteString, which uses the FFI to avoid relying on any latin-1 behviour.
Actually, it uses hGetBuf, which is in base and already specified to return raw bytes. ================== hGet h i = createAndTrim i $ \p -> hGetBuf h p i ================== Stefan