conduit-iconv-0.1.1.1: Conduit for character encoding conversion.

Safe HaskellNone
LanguageHaskell2010

Data.Conduit.IConv

Description

A Conduit based on the iconv library for converting a ByteString from one character set encoding to another

Synopsis

Documentation

type CharacterEncoding = String Source

Type synonym for character encoding names

See convert for details.

convert Source

Arguments

:: Monad m 
=> CharacterEncoding

Name of input character encoding

-> CharacterEncoding

Name of output character encoding

-> Conduit ByteString m ByteString 

Convert text from one named character encoding to another.

Encoding names can be e.g. "UTF-8" or "ISO-8559-1". Appending "//IGNORE" to the output encoding will cause encoding errors to be ignored and the characters to be dropped, "//IGNORE,TRANSLIT" will cause them to be replaced by a replacement character.

Without this encoding errors will cause an exception.

On errors this will call fail