email-header-0.2.0: Parsing and rendering of email and MIME headers

Safe HaskellNone
LanguageHaskell98

Network.Email.Charset

Contents

Description

Charset conversions.

Synopsis

Charsets

data Charset Source

A charset. Charset names are compared fuzzily e.g. UTF-8 is equivalent to utf8.

charsetName :: Charset -> String Source

The name of a charset.

Lookup

charsets :: Set Charset Source

All canonical charset names and aliases.

lookupCharset :: String -> Maybe Charset Source

Lookup a charset from a name or alias, or Nothing if no such charset exists.

defaultCharset :: Charset Source

The default charset, UTF-8.

Conversion

fromUnicode :: Charset -> Text -> ByteString Source

Convert a Unicode string into a codepage string.

toUnicode :: Charset -> ByteString -> Text Source

Convert a codepage string into a Unicode string.