data UnicodeException { } #
DecodeError String (Maybe Word8)
type OnDecodeError = String -> (Maybe Word8) -> Maybe Char { } #
Action to take on a decoding error.
type OnError a b = String -> (Maybe a) -> Maybe b { } #
strictDecode :: OnDecodeError { } #
Throw an exception on decoding errors.
lenientDecode :: OnDecodeError { } #
Replace errors with the Unicode replacement character (U+FFFD).
ignore :: OnDecodeError { } #
replace :: Char -> OnDecodeError { } #
Replace errors with a specific character.
decodeUtf8 :: ByteString -> Text { } #
Decode a ByteString as UTF-8.
decodeUtf8' :: ByteString -> Either UnicodeException Text { } #
decodeUtf8Lenient :: ByteString -> Text { } #
Decode UTF-8, replacing invalid sequences with U+FFFD.
decodeUtf16LE :: ByteString -> Text { } #
Decode UTF-16LE.
decodeUtf16LEWith :: OnDecodeError -> ByteString -> Text { } #
Decode UTF-16LE with custom error handler.
decodeUtf16BE :: ByteString -> Text { } #
Decode UTF-16BE.
decodeUtf16BEWith :: OnDecodeError -> ByteString -> Text { } #
Decode UTF-16BE with custom error handler.
decodeUtf32LE :: ByteString -> Text { } #
Decode UTF-32LE.
decodeUtf32LEWith :: OnDecodeError -> ByteString -> Text { } #
Decode UTF-32LE with custom error handler.
decodeUtf32BE :: ByteString -> Text { } #
Decode UTF-32BE.
decodeUtf32BEWith :: OnDecodeError -> ByteString -> Text { } #
Decode UTF-32BE with custom error handler.
decodeLatin1 :: ByteString -> Text { } #
Decode Latin-1 (ISO-8859-1).
decodeASCII :: ByteString -> Text { } #
Decode ASCII.
decodeASCIIWith :: OnDecodeError -> ByteString -> Text { } #
Decode ASCII with custom error handler.
encodeUtf8 :: Text -> ByteString { } #
Encode a Text to UTF-8.
encodeUtf8Builder :: Text -> Builder { } #
encodeUtf16LE :: Text -> ByteString { } #
Encode as UTF-16LE.
encodeUtf16BE :: Text -> ByteString { } #
Encode as UTF-16BE.
encodeUtf32LE :: Text -> ByteString { } #
Encode as UTF-32LE.
encodeUtf32BE :: Text -> ByteString { } #
Encode as UTF-32BE.
encodeLatin1 :: Text -> ByteString { } #
Encode as Latin-1, truncating code points > 255.
encodeASCII :: Text -> ByteString { } #
Encode as ASCII, truncating code points > 127.
word16LE :: ByteString -> Int -> Word16 { } #
Read a 16-bit little-endian word.
word16BE :: ByteString -> Int -> Word16 { } #
Read a 16-bit big-endian word.
word32LE :: ByteString -> Int -> Word32 { } #
Read a 32-bit little-endian word.
word32BE :: ByteString -> Int -> Word32 { } #
Read a 32-bit big-endian word.
instance Exception UnicodeException { }