| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
FileSystem.UTF8
Description
Provides ByteString - Text (UTF-8) conversions.
Since: 0.1
Synopsis
- decodeUtf8 :: ByteString -> Either UnicodeException Text
- decodeUtf8Lenient :: ByteString -> Text
- decodeUtf8ThrowM :: (HasCallStack, MonadThrow m) => ByteString -> m Text
- decodeUtf8Fail :: (HasCallStack, MonadFail m) => ByteString -> m Text
- unsafeDecodeUtf8 :: HasCallStack => ByteString -> Text
- encodeUtf8 :: Text -> ByteString
Decoding UTF-8
Total
decodeUtf8 :: ByteString -> Either UnicodeException Text Source #
Decodes a ByteString to UTF-8.
Since: 0.1
decodeUtf8Lenient :: ByteString -> Text Source #
Leniently decodes a ByteString to UTF-8.
Since: 0.1
Partial
decodeUtf8ThrowM :: (HasCallStack, MonadThrow m) => ByteString -> m Text Source #
Decodes a ByteString to UTF-8. Can throw UnicodeException.
Since: 0.1
decodeUtf8Fail :: (HasCallStack, MonadFail m) => ByteString -> m Text Source #
Decodes a ByteString to UTF-8.
Since: 0.1
unsafeDecodeUtf8 :: HasCallStack => ByteString -> Text Source #
Encoding UTF-8
encodeUtf8 :: Text -> ByteString #
Encode text using UTF-8 encoding.