shortbytestring-0.2.0.0: Additional ShortByteString API
Safe HaskellNone
LanguageHaskell2010

Data.ByteString.Short.Decode

Synopsis

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.