Hoogle Search
Within LTS Haskell 24.3 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
decodeUtf8With :: OnDecodeError -> InputStream ByteString -> IO (InputStream Text)io-streams System.IO.Streams.Text Decode an InputStream of ByteStrings in UTF-8 format into an InputStream of Text values. If decoding fails, invokes the given OnDecodeError function to decide what to do. See Data.Text.Encoding.decodeUtf8With.
decodeUtf8' :: ByteString -> Either UnicodeException Textrio RIO.Prelude Decode a ByteString containing UTF-8 encoded text. If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf8Lenient :: ByteString -> Textrio RIO.Prelude No documentation available.
decodeUtf8With :: OnDecodeError -> ByteString -> Textrio RIO.Prelude Decode a ByteString containing UTF-8 encoded text. Surrogate code points in replacement character returned by OnDecodeError will be automatically remapped to the replacement char U+FFFD.
decodeUtf8' :: ByteString -> Either UnicodeException Textrio RIO.Text Decode a ByteString containing UTF-8 encoded text. If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf8With :: OnDecodeError -> ByteString -> Textrio RIO.Text Decode a ByteString containing UTF-8 encoded text. Surrogate code points in replacement character returned by OnDecodeError will be automatically remapped to the replacement char U+FFFD.
decodeUtf8Strict :: ConvertUtf8 a b => b -> Either UnicodeException arelude Relude.String.Conversion Decode as utf8 string but returning execption if byte sequence is malformed.
>>> decodeUtf8 @Text @ByteString "\208\208\176\209\130\208\176\208\186" "\65533\1072\1090\1072\1082"
>>> decodeUtf8Strict @Text @ByteString "\208\208\176\209\130\208\176\208\186" Left Cannot decode byte '\xd0': ...: Invalid UTF-8 stream
decodeUtf8' :: ByteString -> Either UnicodeException Textrelude Relude.String.Reexport Decode a ByteString containing UTF-8 encoded text. If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.
decodeUtf8With :: OnDecodeError -> ByteString -> Textrelude Relude.String.Reexport Decode a ByteString containing UTF-8 encoded text. Surrogate code points in replacement character returned by OnDecodeError will be automatically remapped to the replacement char U+FFFD.
decodeUtf8ByteArray :: Decoder s ByteArrayserialise Codec.Serialise.Decoding Decode a textual string as UTF-8 encoded ByteArray. Note that the result is not validated to be well-formed UTF-8. Also note that this will eagerly copy the content out of the input to ensure that the input does not leak in the event that the ByteArray is live but not forced.