- class Encoding enc where
- data EncodingException = HasNoRepresentation Char
- data DecodingException
- recode :: (Encoding from, Encoding to) => from -> to -> ByteString -> ByteString
- recodeLazy :: (Encoding from, Encoding to) => from -> to -> ByteString -> ByteString
- data DynEncoding
- encodingFromString :: String -> DynEncoding
- encodingFromStringMaybe :: String -> Maybe DynEncoding
Represents an encoding, supporting various methods of de- and encoding. Minimal complete definition: encode, decode
String into a lazy
This exception type is thrown whenever something went wrong during the encoding-process.
This exception type is thrown whenever something went wrong during the decoding-process.
The sequence contained an illegal byte that couldn't be decoded.
more bytes were needed to allow a successfull decoding.
the decoded value was out of the unicode range
The character sequence encodes a character, but is illegal.
This decodes a string from one encoding and encodes it into another.
An untyped encoding. Used in
Takes the name of an encoding and creates a dynamic encoding from it.