rio-0.0.1.0: A standard library for Haskell

Safe HaskellSafe
LanguageHaskell2010

RIO.Text

Synopsis

Documentation

module Data.Text

encodeUtf8 :: Text -> ByteString #

Encode text using UTF-8 encoding.

decodeUtf8With :: OnDecodeError -> ByteString -> Text #

Decode a ByteString containing UTF-8 encoded text.

decodeUtf8' :: ByteString -> Either UnicodeException Text #

Decode a ByteString containing UTF-8 encoded text.

If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.

lenientDecode :: OnDecodeError #

Replace an invalid input byte with the Unicode replacement character U+FFFD.