Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.ByteString.Short.Decode
Synopsis
- decodeUtf16LE :: ShortByteString -> String
- decodeUtf16LEWith :: OnDecodeError -> ShortByteString -> String
- decodeUtf16LE' :: ShortByteString -> Either UnicodeException String
- decodeUtf16LE'' :: ByteString -> Either UnicodeException Text
- decodeUtf8 :: ShortByteString -> String
- decodeUtf8With :: OnDecodeError -> ShortByteString -> String
- decodeUtf8' :: ShortByteString -> Either UnicodeException String
Documentation
decodeUtf16LE :: ShortByteString -> String Source #
Decode text from little endian UTF-16 encoding.
If the input contains any invalid little endian UTF-16 data, an
exception will be thrown. For more control over the handling of
invalid data, use decodeUtf16LEWith
.
decodeUtf16LEWith :: OnDecodeError -> ShortByteString -> String Source #
Decode text from little endian UTF-16 encoding.
decodeUtf16LE' :: ShortByteString -> Either UnicodeException String Source #
Decode a ShortByteString
containing UTF-16 encoded text.
If the input contains any invalid UTF-16 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf16LE'' :: ByteString -> Either UnicodeException Text Source #
Decode a ByteString
containing UTF-16 encoded text.
If the input contains any invalid UTF-16 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf8 :: ShortByteString -> String Source #
Decode text from little endian UTF-16 encoding.
If the input contains any invalid little endian UTF-16 data, an
exception will be thrown. For more control over the handling of
invalid data, use decodeUtf16LEWith
.
decodeUtf8With :: OnDecodeError -> ShortByteString -> String Source #
Decode text from little endian UTF-16 encoding.
decodeUtf8' :: ShortByteString -> Either UnicodeException String Source #
Decode a ShortByteString
containing UTF-8 encoded text.
If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.