Data.Textual.Encoding

chunked-data-0.2.0: Typeclasses for dealing with various chunked data representations

Safe Haskell | None
Language | Haskell98

Data.Textual.Encoding

Synopsis

- class (Textual textual, IsSequence binary) => Utf8 textual binary | textual -> binary, binary -> textual where
  - encodeUtf8 :: textual -> binary
  - decodeUtf8 :: binary -> textual

# Documentation

class (Textual textual, IsSequence binary) => Utf8 textual binary | textual -> binary, binary -> textual where

Textual data which can be encoded to and decoded from UTF8.

Methods

encodeUtf8 :: textual -> binary

decodeUtf8 :: binary -> textual

Note that this function is required to be pure. In the case of a decoding error, Unicode replacement characters must be used.

Instances

Utf8 Text ByteString |
Utf8 Text ByteString |
((~) * c Char, (~) * w Word8) => Utf8 [c] [w] |