fs-utils-0.1: FileSystem utils
Safe HaskellNone
LanguageGHC2021

FileSystem.UTF8

Description

Provides ByteString - Text (UTF-8) conversions.

Since: 0.1

Synopsis

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 #

Decodes a ByteString to UTF-8.

WARNING: Partial

Since: 0.1

Encoding UTF-8

encodeUtf8 :: Text -> ByteString #

Encode text using UTF-8 encoding.