-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A library for various character encodings -- -- Haskell has excellect handling of unicode, the Char type covers all -- unicode chars. Unfortunatly, there's no possibility to read or write -- something to the outer world in an encoding other than ascii due to -- the lack of support for encodings. This library should help with that. @package encoding @version 0.3 -- | ASCII (American Standard Code for Information Interchange) is the -- "normal" computer encoding using the byte values 0-127 to represent -- characters. Refer to http://en.wikipedia.org/wiki/ASCII for -- more informations. module Data.Encoding.ASCII data ASCII ASCII :: ASCII instance Show ASCII instance Encoding ASCII -- | This module implements UTF-8 encoding and decoding as in RFC 3629. module Data.Encoding.UTF8 data UTF8 UTF8 :: UTF8 instance Eq UTF8AnalyzeState instance Show UTF8 instance Encoding UTF8 -- | This module implements UTF-16 encoding and decoding as in RFC 2781 module Data.Encoding.UTF16 data UTF16 UTF16 :: UTF16 UTF16BE :: UTF16 UTF16LE :: UTF16 instance Eq UTF16 instance Show UTF16 instance Encoding UTF16 module Data.Encoding.UTF32 data UTF32 UTF32 :: UTF32 instance Show UTF32 instance Encoding UTF32 -- | Implements ISO/IEC 8859-1 alias latin-1 encoding. See -- http://en.wikipedia.org/wiki/ISO/IEC_8859-1 for further -- informations. module Data.Encoding.ISO88591 data ISO88591 ISO88591 :: ISO88591 instance Show ISO88591 instance Encoding ISO88591 -- | Implements ISO/IEC 8859-2 alias latin-2 encoding. See -- http://en.wikipedia.org/wiki/ISO/IEC_8859-2 for further -- informations. module Data.Encoding.ISO88592 data ISO88592 ISO88592 :: ISO88592 instance Show ISO88592 instance Encoding ISO88592 -- | Implements ISO 8859-3 encoding, alias latin-3, alias south european module Data.Encoding.ISO88593 data ISO88593 ISO88593 :: ISO88593 instance Show ISO88593 instance Encoding ISO88593 module Data.Encoding.ISO88594 data ISO88594 ISO88594 :: ISO88594 instance Show ISO88594 instance Encoding ISO88594 module Data.Encoding.ISO88595 data ISO88595 ISO88595 :: ISO88595 instance Show ISO88595 instance Encoding ISO88595 module Data.Encoding.ISO88596 data ISO88596 ISO88596 :: ISO88596 instance Show ISO88596 instance Encoding ISO88596 module Data.Encoding.ISO88597 data ISO88597 ISO88597 :: ISO88597 instance Show ISO88597 instance Encoding ISO88597 module Data.Encoding.ISO88598 data ISO88598 ISO88598 :: ISO88598 instance Show ISO88598 instance Encoding ISO88598 module Data.Encoding.ISO88599 data ISO88599 ISO88599 :: ISO88599 instance Show ISO88599 instance Encoding ISO88599 module Data.Encoding.ISO885910 data ISO885910 ISO885910 :: ISO885910 instance Show ISO885910 instance Encoding ISO885910 module Data.Encoding.ISO885911 data ISO885911 ISO885911 :: ISO885911 instance Show ISO885911 instance Encoding ISO885911 module Data.Encoding.ISO885913 data ISO885913 ISO885913 :: ISO885913 instance Show ISO885913 instance Encoding ISO885913 module Data.Encoding.ISO885914 data ISO885914 ISO885914 :: ISO885914 instance Show ISO885914 instance Encoding ISO885914 module Data.Encoding.ISO885915 data ISO885915 ISO885915 :: ISO885915 instance Show ISO885915 instance Encoding ISO885915 module Data.Encoding.ISO885916 data ISO885916 ISO885916 :: ISO885916 instance Show ISO885916 instance Encoding ISO885916 module Data.Encoding.CP1250 data CP1250 CP1250 :: CP1250 instance Show CP1250 instance Encoding CP1250 module Data.Encoding.CP1251 data CP1251 CP1251 :: CP1251 instance Show CP1251 instance Encoding CP1251 module Data.Encoding.CP1252 data CP1252 CP1252 :: CP1252 instance Show CP1252 instance Encoding CP1252 module Data.Encoding.CP1253 data CP1253 CP1253 :: CP1253 instance Show CP1253 instance Encoding CP1253 module Data.Encoding.CP1254 data CP1254 CP1254 :: CP1254 instance Show CP1254 instance Encoding CP1254 module Data.Encoding.CP1255 data CP1255 CP1255 :: CP1255 instance Show CP1255 instance Encoding CP1255 module Data.Encoding.CP1256 data CP1256 CP1256 :: CP1256 instance Show CP1256 instance Encoding CP1256 module Data.Encoding.CP1257 data CP1257 CP1257 :: CP1257 instance Show CP1257 instance Encoding CP1257 module Data.Encoding.CP1258 data CP1258 CP1258 :: CP1258 instance Show CP1258 instance Encoding CP1258 module Data.Encoding.KOI8R data KOI8R KOI8R :: KOI8R instance Show KOI8R instance Encoding KOI8R -- | GB18030 is a chinese character encoding that is mandatory in china (if -- you - don't implement it, you're not allowed to sell your software -- there). module Data.Encoding.GB18030 data GB18030 GB18030 :: GB18030 instance Eq DecodingState instance Show GB18030 instance Encoding GB18030 -- | This implements BootString en- and decoding, the foundation of -- Punycode module Data.Encoding.BootString data BootString BootString :: Int -> Int -> Int -> Int -> Int -> Int -> Int -> BootString base :: BootString -> Int tmin :: BootString -> Int tmax :: BootString -> Int skew :: BootString -> Int damp :: BootString -> Int init_bias :: BootString -> Int init_n :: BootString -> Int punycode :: BootString instance Encoding BootString module Data.Encoding -- | Represents an encoding, supporting various methods of de- and -- encoding. Minimal complete definition: encode, decode class Encoding enc encode :: (Encoding enc) => enc -> String -> ByteString encodeLazy :: (Encoding enc) => enc -> String -> ByteString encodable :: (Encoding enc) => enc -> Char -> Bool decode :: (Encoding enc) => enc -> ByteString -> String decodeLazy :: (Encoding enc) => enc -> ByteString -> String decodable :: (Encoding enc) => enc -> ByteString -> Bool -- | This exception type is thrown whenever something went wrong during the -- encoding-process. data EncodingException -- | Thrown if a specific character is not representable in an encoding. HasNoRepresentation :: Char -> EncodingException -- | This exception type is thrown whenever something went wrong during the -- decoding-process. data DecodingException -- | The sequence contained an illegal byte that couldn't be decoded. IllegalCharacter :: Word8 -> DecodingException -- | more bytes were needed to allow a successfull decoding. UnexpectedEnd :: DecodingException -- | the decoded value was out of the unicode range OutOfRange :: DecodingException -- | This decodes a string from one encoding and encodes it into another. recode :: (Encoding from, Encoding to) => from -> to -> ByteString -> ByteString recodeLazy :: (Encoding from, Encoding to) => from -> to -> ByteString -> ByteString -- | An untyped encoding. Used in -- System.IO.Encoding.getSystemEncoding. data DynEncoding -- | Takes the name of an encoding and creates a dynamic encoding from it. encodingFromString :: String -> DynEncoding instance Show DynEncoding instance Encoding DynEncoding module System.IO.Encoding -- | Returns the encoding used on the current system. getSystemEncoding :: IO DynEncoding -- | Like the normal System.IO.hPutStr, but encodes the output -- using an encoding. hPutStr :: (Encoding e) => e -> Handle -> String -> IO () -- | Like the normal System.IO.hGetContents, but decodes the input -- using an encoding. hGetContents :: (Encoding e) => e -> Handle -> IO String