    {-# LANGUAGE FlexibleContexts #-}
    module Data.Encoding
        (module Data.Encoding.Exception
        ,module Data.Encoding.ByteSource
        ,module Data.Encoding.ByteSink
        ,Encoding(..)
        ,DynEncoding
        ,recode
        ,encodeString
        ,encodeStringExplicit
        ,decodeString
        ,decodeStringExplicit
        ,encodeLazyByteString
        ,encodeLazyByteStringExplicit
        ,decodeLazyByteString
        ,decodeLazyByteStringExplicit
        ,encodeStrictByteString
        ,encodeStrictByteStringExplicit
        ,decodeStrictByteString
        ,decodeStrictByteStringExplicit
        ,encodingFromString
        ,encodingFromStringExplicit
        )
        where

    import Data.Encoding.Base
    import Data.Encoding.ByteSource
    import Data.Encoding.ByteSink
    import Data.Encoding.Exception

    import Data.Sequence
    import Data.Foldable(toList)
    import Data.Char

    import Control.Monad.State
    import Control.Monad.Identity
    import Control.Monad.Error.Class
    import Data.Binary.Put
    import Data.Binary.Get

    import qualified Data.ByteString as BS
    import qualified Data.ByteString.Lazy as LBS

    import Data.Encoding.ASCII
    import Data.Encoding.UTF8
    import Data.Encoding.UTF16
    import Data.Encoding.UTF32
    import Data.Encoding.ISO88591
    import Data.Encoding.ISO88592
    import Data.Encoding.ISO88593
    import Data.Encoding.ISO88594
    import Data.Encoding.ISO88595
    import Data.Encoding.ISO88596
    import Data.Encoding.ISO88597
    import Data.Encoding.ISO88598
    import Data.Encoding.ISO88599
    import Data.Encoding.ISO885910
    import Data.Encoding.ISO885911
    import Data.Encoding.ISO885913
    import Data.Encoding.ISO885914
    import Data.Encoding.ISO885915
    import Data.Encoding.ISO885916
    import Data.Encoding.CP1250
    import Data.Encoding.CP1251
    import Data.Encoding.CP1252
    import Data.Encoding.CP1253
    import Data.Encoding.CP1254
    import Data.Encoding.CP1255
    import Data.Encoding.CP1256
    import Data.Encoding.CP1257
    import Data.Encoding.CP1258
    import Data.Encoding.KOI8R
    import Data.Encoding.KOI8U
    import Data.Encoding.GB18030
    import Data.Encoding.MacOSRoman
    import Data.Encoding.JISX0201
    import Data.Encoding.JISX0208
    import Data.Encoding.ISO2022JP
    import Data.Encoding.ShiftJIS
    import Data.Encoding.CP437
    import Data.Encoding.CP737
    import Data.Encoding.CP775
    import Data.Encoding.CP850
    import Data.Encoding.CP852
    import Data.Encoding.CP855
    import Data.Encoding.CP857
    import Data.Encoding.CP860
    import Data.Encoding.CP861
    import Data.Encoding.CP862
    import Data.Encoding.CP863
    import Data.Encoding.CP864
    import Data.Encoding.CP865
    import Data.Encoding.CP866
    import Data.Encoding.CP869
    import Data.Encoding.CP874
    import Data.Encoding.CP932
    import Data.Char
    import Text.Regex

    recode :: (Encoding enc1,Encoding enc2,ByteSource m,ByteSink m) => enc1 -> enc2 -> m ()
    recode :: forall enc1 enc2 (m :: * -> *).
    (Encoding enc1, Encoding enc2, ByteSource m, ByteSink m) =>
    enc1 -> enc2 -> m ()
    recode enc1
    e1 enc2
    e2 = m Bool -> m () -> m ()
    forall (m :: * -> *) a. Monad m => m Bool -> m a -> m ()
    untilM_ m Bool
    forall (m :: * -> *). ByteSource m => m Bool
    sourceEmpty (enc1 -> m Char
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m Char
    forall (m :: * -> *). ByteSource m => enc1 -> m Char
    decodeChar enc1
    e1 m Char -> (Char -> m ()) -> m ()
    forall a b. m a -> (a -> m b) -> m b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= enc2 -> Char -> m ()
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> Char -> m ()
    forall (m :: * -> *). ByteSink m => enc2 -> Char -> m ()
    encodeChar enc2
    e2)

    encodeString :: Encoding enc => enc -> String -> String
    encodeString :: forall enc. Encoding enc => enc -> String -> String
    encodeString enc
    e String
    str = ViewL Char -> String
    forall a. ViewL a -> [a]
    forall (t :: * -> *) a. Foldable t => t a -> [a]
    toList (ViewL Char -> String) -> ViewL Char -> String
    forall a b. (a -> b) -> a -> b
    $ Seq Char -> ViewL Char
    forall a. Seq a -> ViewL a
    viewl (Seq Char -> ViewL Char) -> Seq Char -> ViewL Char
    forall a b. (a -> b) -> a -> b
    $ State (Seq Char) () -> Seq Char -> Seq Char
    forall s a. State s a -> s -> s
    execState (enc -> String -> State (Seq Char) ()
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> String -> m ()
    forall (m :: * -> *). ByteSink m => enc -> String -> m ()
    encode enc
    e String
    str) Seq Char
    forall a. Seq a
    empty

    encodeStringExplicit :: Encoding enc => enc -> String -> Either EncodingException String
    encodeStringExplicit :: forall enc.
    Encoding enc =>
    enc -> String -> Either EncodingException String
    encodeStringExplicit enc
    e String
    str = StateT (Seq Char) (Either EncodingException) ()
    -> Seq Char -> Either EncodingException (Seq Char)
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m s
    execStateT (enc -> String -> StateT (Seq Char) (Either EncodingException) ()
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> String -> m ()
    forall (m :: * -> *). ByteSink m => enc -> String -> m ()
    encode enc
    e String
    str) Seq Char
    forall a. Seq a
    empty Either EncodingException (Seq Char)
    -> (Seq Char -> Either EncodingException String)
    -> Either EncodingException String
    forall a b.
    Either EncodingException a
    -> (a -> Either EncodingException b) -> Either EncodingException b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= String -> Either EncodingException String
    forall a. a -> Either EncodingException a
    forall (m :: * -> *) a. Monad m => a -> m a
    return(String -> Either EncodingException String)
    -> (Seq Char -> String)
    -> Seq Char
    -> Either EncodingException String
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    .ViewL Char -> String
    forall a. ViewL a -> [a]
    forall (t :: * -> *) a. Foldable t => t a -> [a]
    toList(ViewL Char -> String)
    -> (Seq Char -> ViewL Char) -> Seq Char -> String
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    .Seq Char -> ViewL Char
    forall a. Seq a -> ViewL a
    viewl

    decodeString :: Encoding enc => enc -> String -> String
    decodeString :: forall enc. Encoding enc => enc -> String -> String
    decodeString enc
    e String
    str = State String String -> String -> String
    forall s a. State s a -> s -> a
    evalState (enc -> State String String
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m String
    forall (m :: * -> *). ByteSource m => enc -> m String
    decode enc
    e) String
    str

    decodeStringExplicit :: Encoding enc => enc -> String -> Either DecodingException String
    decodeStringExplicit :: forall enc.
    Encoding enc =>
    enc -> String -> Either DecodingException String
    decodeStringExplicit enc
    e String
    str = StateT String (Either DecodingException) String
    -> String -> Either DecodingException String
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m a
    evalStateT (enc -> StateT String (Either DecodingException) String
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m String
    forall (m :: * -> *). ByteSource m => enc -> m String
    decode enc
    e) String
    str

    encodeLazyByteString :: Encoding enc => enc -> String -> LBS.ByteString
    encodeLazyByteString :: forall enc. Encoding enc => enc -> String -> ByteString
    encodeLazyByteString enc
    e String
    str = Put -> ByteString
    runPut (Put -> ByteString) -> Put -> ByteString
    forall a b. (a -> b) -> a -> b
    $ enc -> String -> Put
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> String -> m ()
    forall (m :: * -> *). ByteSink m => enc -> String -> m ()
    encode enc
    e String
    str

    encodeLazyByteStringExplicit :: Encoding enc => enc -> String -> Either EncodingException LBS.ByteString
    encodeLazyByteStringExplicit :: forall enc.
    Encoding enc =>
    enc -> String -> Either EncodingException ByteString
    encodeLazyByteStringExplicit enc
    e String
    str = let PutME Either EncodingException (Put, ())
    g = enc -> String -> PutME ()
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> String -> m ()
    forall (m :: * -> *). ByteSink m => enc -> String -> m ()
    encode enc
    e String
    str
                                         in case Either EncodingException (Put, ())
    g of
                                              Left EncodingException
    err -> EncodingException -> Either EncodingException ByteString
    forall a b. a -> Either a b
    Left EncodingException
    err
                                              Right (Put
    p,()) -> ByteString -> Either EncodingException ByteString
    forall a b. b -> Either a b
    Right (ByteString -> Either EncodingException ByteString)
    -> ByteString -> Either EncodingException ByteString
    forall a b. (a -> b) -> a -> b
    $ Put -> ByteString
    runPut Put
    p

    decodeLazyByteString :: Encoding enc => enc -> LBS.ByteString -> String
    decodeLazyByteString :: forall enc. Encoding enc => enc -> ByteString -> String
    decodeLazyByteString enc
    e ByteString
    str = Get String -> ByteString -> String
    forall a. Get a -> ByteString -> a
    runGet (enc -> Get String
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m String
    forall (m :: * -> *). ByteSource m => enc -> m String
    decode enc
    e) ByteString
    str

    decodeLazyByteStringExplicit :: Encoding enc => enc -> LBS.ByteString -> Either DecodingException String
    decodeLazyByteStringExplicit :: forall enc.
    Encoding enc =>
    enc -> ByteString -> Either DecodingException String
    decodeLazyByteStringExplicit enc
    e ByteString
    str = StateT ByteString (Either DecodingException) String
    -> ByteString -> Either DecodingException String
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m a
    evalStateT (enc -> StateT ByteString (Either DecodingException) String
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m String
    forall (m :: * -> *). ByteSource m => enc -> m String
    decode enc
    e) ByteString
    str

    encodeStrictByteString :: Encoding enc => enc -> String -> BS.ByteString
    encodeStrictByteString :: forall enc. Encoding enc => enc -> String -> ByteString
    encodeStrictByteString enc
    e String
    str = ((), ByteString) -> ByteString
    forall a b. (a, b) -> b
    snd (((), ByteString) -> ByteString) -> ((), ByteString) -> ByteString
    forall a b. (a -> b) -> a -> b
    $ StrictSink () -> ((), ByteString)
    forall a. StrictSink a -> (a, ByteString)
    createStrict (StrictSink () -> ((), ByteString))
    -> StrictSink () -> ((), ByteString)
    forall a b. (a -> b) -> a -> b
    $ enc -> String -> StrictSink ()
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> String -> m ()
    forall (m :: * -> *). ByteSink m => enc -> String -> m ()
    encode enc
    e String
    str

    encodeStrictByteStringExplicit :: Encoding enc => enc -> String -> Either EncodingException BS.ByteString
    encodeStrictByteStringExplicit :: forall enc.
    Encoding enc =>
    enc -> String -> Either EncodingException ByteString
    encodeStrictByteStringExplicit enc
    e String
    str = let StrictSinkE StrictSink (Either EncodingException ())
    g = enc -> String -> StrictSinkE ()
    forall enc (m :: * -> *).
    (Encoding enc, ByteSink m) =>
    enc -> String -> m ()
    forall (m :: * -> *). ByteSink m => enc -> String -> m ()
    encode enc
    e String
    str
                                               (Either EncodingException ()
    r,ByteString
    bstr) = StrictSink (Either EncodingException ())
    -> (Either EncodingException (), ByteString)
    forall a. StrictSink a -> (a, ByteString)
    createStrict StrictSink (Either EncodingException ())
    g
                                           in case Either EncodingException ()
    r of
                                                Left EncodingException
    err -> EncodingException -> Either EncodingException ByteString
    forall a b. a -> Either a b
    Left EncodingException
    err
                                                Right ()
    _  -> ByteString -> Either EncodingException ByteString
    forall a b. b -> Either a b
    Right ByteString
    bstr

    decodeStrictByteString :: Encoding enc => enc -> BS.ByteString -> String
    decodeStrictByteString :: forall enc. Encoding enc => enc -> ByteString -> String
    decodeStrictByteString enc
    e ByteString
    str = State ByteString String -> ByteString -> String
    forall s a. State s a -> s -> a
    evalState (enc -> State ByteString String
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m String
    forall (m :: * -> *). ByteSource m => enc -> m String
    decode enc
    e) ByteString
    str

    decodeStrictByteStringExplicit :: Encoding enc => enc -> BS.ByteString -> Either DecodingException String
    decodeStrictByteStringExplicit :: forall enc.
    Encoding enc =>
    enc -> ByteString -> Either DecodingException String
    decodeStrictByteStringExplicit enc
    e ByteString
    str = StateT ByteString (Either DecodingException) String
    -> ByteString -> Either DecodingException String
    forall (m :: * -> *) s a. Monad m => StateT s m a -> s -> m a
    evalStateT (enc -> StateT ByteString (Either DecodingException) String
    forall enc (m :: * -> *).
    (Encoding enc, ByteSource m) =>
    enc -> m String
    forall (m :: * -> *). ByteSource m => enc -> m String
    decode enc
    e) ByteString
    str

    -- | Like 'encodingFromString' but returns 'Nothing' instead of throwing an error
    encodingFromStringExplicit :: String -> Maybe DynEncoding
    encodingFromStringExplicit :: String -> Maybe DynEncoding
    encodingFromStringExplicit String
    codeName = case (String -> String
    normalizeEncoding String
    codeName) of
        -- ASCII
        String
    "ascii"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "646"                -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "ansi_x3_4_1968"     -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "ansi_x3.4_1986"     -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "cp367"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "csascii"            -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "ibm367"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "iso646_us"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "iso_646.irv_1991"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "iso_ir_6"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "us"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        String
    "us_ascii"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ASCII -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ASCII
    ASCII
        -- UTF-8
        String
    "utf_8"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF8 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF8
    UTF8
        String
    "u8"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF8 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF8
    UTF8
        String
    "utf"                -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF8 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF8
    UTF8
        String
    "utf8"               -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF8 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF8
    UTF8
        String
    "utf8_ucs2"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF8 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF8
    UTF8
        String
    "utf8_ucs4"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF8 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF8
    UTF8
        -- UTF-16
        String
    "utf_16"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF16 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF16
    UTF16
        String
    "u16"                -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF16 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF16
    UTF16
        String
    "utf16"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF16 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF16
    UTF16
        -- UTF-32
        String
    "utf_32"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ UTF32 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding UTF32
    UTF32
        -- KOI8-R
        String
    "koi8_r"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ KOI8R -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding KOI8R
    KOI8R
        String
    "cskoi8r"            -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ KOI8R -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding KOI8R
    KOI8R
        -- KOI8-I
        String
    "koi8_u"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ KOI8U -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding KOI8U
    KOI8U
        -- ISO-8859-1
        String
    "iso_8859_1"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "iso8859_1"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "8859"               -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "cp819"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "csisolatin1"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "ibm819"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "iso8859"            -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "iso_8859_1_1987"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "iso_ir_100"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "l1"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "latin"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        String
    "latin1"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88591 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88591
    ISO88591
        -- ISO-8859-2
        String
    "iso_8859_2"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        String
    "iso8859_2"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        String
    "csisolatin2"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        String
    "iso_8859_2_1987"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        String
    "iso_ir_101"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        String
    "l2"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        String
    "latin2"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88592 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88592
    ISO88592
        -- ISO-8859-3
        String
    "iso_8859_3"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        String
    "iso8859_3"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        String
    "csisolatin3"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        String
    "iso_8859_3_1988"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        String
    "iso_ir_109"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        String
    "l3"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        String
    "latin3"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88593 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88593
    ISO88593
        --ISO-8859-4
        String
    "iso_8859_4"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        String
    "iso8859_4"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        String
    "csisolatin4"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        String
    "iso_8859_4_1988"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        String
    "iso_ir_110"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        String
    "l4"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        String
    "latin4"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88594 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88594
    ISO88594
        --ISO-8859-5
        String
    "iso_8859_5"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88595 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88595
    ISO88595
        String
    "iso8859_5"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88595 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88595
    ISO88595
        String
    "csisolatincyrillic" -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88595 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88595
    ISO88595
        String
    "cyrillic"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88595 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88595
    ISO88595
        String
    "iso_8859_5_1988"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88595 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88595
    ISO88595
        String
    "iso_ir_144"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88595 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88595
    ISO88595
        -- ISO-8859-6
        String
    "iso_8859_6"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "iso8859_6"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "arabic"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "asmo_708"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "csisolatinarabic"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "ecma_114"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "iso_8859_6_1987"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        String
    "iso_ir_127"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88596 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88596
    ISO88596
        -- ISO-8859-7
        String
    "iso_8859_7"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "iso8859_7"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "csisolatingreek"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "ecma_118"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "elot_928"           -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "greek"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "greek8"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "iso_8859_7_1987"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        String
    "iso_ir_126"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88597 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88597
    ISO88597
        -- ISO-8859-8
        String
    "iso_8859_8"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88598 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88598
    ISO88598
        String
    "iso8859_8"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88598 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88598
    ISO88598
        String
    "csisolatinhebrew"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88598 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88598
    ISO88598
        String
    "hebrew"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88598 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88598
    ISO88598
        String
    "iso_8859_8_1988"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88598 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88598
    ISO88598
        String
    "iso_ir_138"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88598 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88598
    ISO88598
        -- ISO-8859-9
        String
    "iso_8859_9"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        String
    "iso8859_9"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        String
    "csisolatin5"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        String
    "iso_8859_9_1989"    -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        String
    "iso_ir_148"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        String
    "l5"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        String
    "latin5"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO88599 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO88599
    ISO88599
        -- ISO-8859-10
        String
    "iso_8859_10"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        String
    "iso8859_10"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        String
    "csisolatin6"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        String
    "iso_8859_10_1992"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        String
    "iso_ir_157"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        String
    "l6"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        String
    "latin6"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885910 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885910
    ISO885910
        -- ISO-8859-11
        String
    "iso_8859_11"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885911 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885911
    ISO885911
        String
    "iso8859_11"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885911 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885911
    ISO885911
        String
    "thai"               -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885911 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885911
    ISO885911
        String
    "iso_8859_11_2001"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885911 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885911
    ISO885911
        -- ISO-8859-13
        String
    "iso_8859_13"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885913 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885913
    ISO885913
        String
    "iso8859_13"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885913 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885913
    ISO885913
        -- ISO-8859-14
        String
    "iso_8859_14"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        String
    "iso8859_14"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        String
    "iso_8859_14_1998"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        String
    "iso_celtic"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        String
    "iso_ir_199"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        String
    "l8"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        String
    "latin8"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885914 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885914
    ISO885914
        -- ISO-8859-15
        String
    "iso_8859_15"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885915 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885915
    ISO885915
        String
    "iso8859_15"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885915 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885915
    ISO885915
        String
    "latin9"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885915 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885915
    ISO885915
        String
    "l9"                 -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885915 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885915
    ISO885915
        -- ISO-8859-16
        String
    "iso_8859_16"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885916 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885916
    ISO885916
        String
    "iso8859_16"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885916 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885916
    ISO885916
        String
    "iso_8859_16_2001"   -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885916 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885916
    ISO885916
        String
    "iso_ir_226"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885916 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885916
    ISO885916
        String
    "l10"                -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885916 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885916
    ISO885916
        String
    "latin10"            -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO885916 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO885916
    ISO885916
        -- CP1250
        String
    "cp1250"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1250 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1250
    CP1250
        String
    "windows_1250"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1250 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1250
    CP1250
        -- CP1251
        String
    "cp1251"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1251 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1251
    CP1251
        String
    "windows_1251"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1251 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1251
    CP1251
        -- CP1252
        String
    "cp1252"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1252 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1252
    CP1252
        String
    "windows_1252"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1252 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1252
    CP1252
        -- CP1253
        String
    "cp1253"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1253 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1253
    CP1253
        String
    "windows_1253"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1253 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1253
    CP1253
        -- CP1254
        String
    "cp1254"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1254 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1254
    CP1254
        String
    "windows_1254"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1254 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1254
    CP1254
        -- CP1255
        String
    "cp1255"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1255 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1255
    CP1255
        String
    "windows_1255"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1255 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1255
    CP1255
        -- CP1256
        String
    "cp1256"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1256 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1256
    CP1256
        String
    "windows_1256"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1256 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1256
    CP1256
        -- CP1257
        String
    "cp1257"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1257 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1257
    CP1257
        String
    "windows_1257"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1257 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1257
    CP1257
        -- CP1258
        String
    "cp1258"             -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1258 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1258
    CP1258
        String
    "windows_1258"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP1258 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP1258
    CP1258
        -- GB18030
        String
    "gb18030"            -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ GB18030 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding GB18030
    GB18030
        String
    "gb18030_2000"       -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ GB18030 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding GB18030
    GB18030
        -- MacOSRoman
        String
    "macintosh"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ MacOSRoman -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding MacOSRoman
    MacOSRoman
        -- JIS X 0201
        String
    "jis_x_0201"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ JISX0201 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding JISX0201
    JISX0201
        -- JIS X 0208
        String
    "jis_x_0208"         -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ JISX0208 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding JISX0208
    JISX0208
        -- ISO 2022-JP
        String
    "iso_2022_jp"        -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ISO2022JP -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ISO2022JP
    ISO2022JP
        -- Shift JIS
        String
    "shift_jis"          -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ShiftJIS -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ShiftJIS
    ShiftJIS
        String
    "sjis"               -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ ShiftJIS -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding ShiftJIS
    ShiftJIS
        -- MSDOS codepages
        String
    "cp437"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP437 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP437
    CP437
        String
    "cp737"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP737 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP737
    CP737
        String
    "cp775"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP775 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP775
    CP775
        String
    "cp850"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP850 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP850
    CP850
        String
    "cp852"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP852 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP852
    CP852
        String
    "cp855"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP855 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP855
    CP855
        String
    "cp857"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP857 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP857
    CP857
        String
    "cp860"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP860 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP860
    CP860
        String
    "cp861"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP861 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP861
    CP861
        String
    "cp862"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP862 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP862
    CP862
        String
    "cp863"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP863 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP863
    CP863
        String
    "cp864"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP864 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP864
    CP864
        String
    "cp865"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP865 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP865
    CP865
        String
    "cp866"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP866 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP866
    CP866
        String
    "cp869"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP869 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP869
    CP869
        String
    "cp874"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP874 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP874
    CP874
        String
    "cp932"              -> DynEncoding -> Maybe DynEncoding
    forall a. a -> Maybe a
    Just (DynEncoding -> Maybe DynEncoding)
    -> DynEncoding -> Maybe DynEncoding
    forall a b. (a -> b) -> a -> b
    $ CP932 -> DynEncoding
    forall enc.
    (Encoding enc, Eq enc, Typeable enc, Show enc) =>
    enc -> DynEncoding
    DynEncoding CP932
    CP932
        -- defaults to nothing
        String
    _                    -> Maybe DynEncoding
    forall a. Maybe a
    Nothing
      where
        normalizeEncoding :: String -> String
    normalizeEncoding String
    s = (Char -> Char) -> String -> String
    forall a b. (a -> b) -> [a] -> [b]
    map Char -> Char
    toLower (String -> String) -> String -> String
    forall a b. (a -> b) -> a -> b
    $ Regex -> String -> String -> String
    subRegex Regex
    sep String
    s String
    "_"
        sep :: Regex
    sep = String -> Regex
    mkRegex String
    "[^0-9A-Za-z]+"

    -- | Takes the name of an encoding and creates a dynamic encoding from it.
    encodingFromString :: String -> DynEncoding
    encodingFromString :: String -> DynEncoding
    encodingFromString String
    str = DynEncoding
    -> (DynEncoding -> DynEncoding) -> Maybe DynEncoding -> DynEncoding
    forall b a. b -> (a -> b) -> Maybe a -> b
    maybe
    	(String -> DynEncoding
    forall a. HasCallStack => String -> a
    error (String -> DynEncoding) -> String -> DynEncoding
    forall a b. (a -> b) -> a -> b
    $ String
    "Data.Encoding.encodingFromString: Unknown encoding: "String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++String -> String
    forall a. Show a => a -> String
    show String
    str)
    	DynEncoding -> DynEncoding
    forall a. a -> a
    id
    	(String -> Maybe DynEncoding
    encodingFromStringExplicit String
    str)