Safe Haskell | None |
---|---|
Language | Haskell2010 |
Stream primitives for decoding and encoding Text
values in UTF-8 format.
- decodeUtf8 :: InputStream ByteString -> IO (InputStream Text)
- decodeUtf8With :: OnDecodeError -> InputStream ByteString -> IO (InputStream Text)
- encodeUtf8 :: OutputStream ByteString -> IO (OutputStream Text)
Decoders and Encoders
decodeUtf8 :: InputStream ByteString -> IO (InputStream Text) Source #
Decode an InputStream
of ByteString
s in UTF-8 format into an
InputStream
of Text
values. If decoding fails, will throw an exception.
See Data.Text.Encoding.
.decodeUtf8
decodeUtf8With :: OnDecodeError -> InputStream ByteString -> IO (InputStream Text) Source #
Decode an InputStream
of ByteString
s in UTF-8 format into an
InputStream
of Text
values. If decoding fails, invokes the given
OnDecodeError
function to decide what to do. See
Data.Text.Encoding.
.decodeUtf8With
encodeUtf8 :: OutputStream ByteString -> IO (OutputStream Text) Source #
Convert an OutputStream
taking ByteString
s to an OutputStream
that
takes Text
, encoding the data as UTF-8. See
Data.Text.Encoding.
.encodeUtf8