hurl-2.1.1.0: Haskell URL resolver
Safe HaskellNone
LanguageHaskell2010

Network.URI.Charset

Description

Handles server-specified text decoding.

Synopsis

Documentation

resolveCharset Source #

Arguments

:: [String]

The MIMEtype, split by ';'

-> ByteString

The bytes received from the server

-> (String, Either Text ByteString)

The MIMEtype (minus parameters) & possibly decoded text, to be returned from protocol handlers.

If the MIMEtype specifies a charset parameter, apply it.

resolveCharset' :: a -> [String] -> ByteString -> (a, String, Either Text ByteString) Source #

As per resolveCharset, but also returns given URI (or other type).

convertCharset :: [Char] -> ByteString -> Text Source #

Decodes bytes according to a charset identified by it's IANA-assigned name(s).

charsets :: [Text] Source #

Lists all charsets supported by convertCharset