The iconv package

[ Tags: bsd3, library, text ] [ Propose Tags ]

Provides an interface to the POSIX iconv library functions for string encoding conversion.

[Skip to Readme]


Versions 0.2, 0.4,,,,,
Dependencies base (>=3 && <4.7), bytestring (==0.9.*) [details]
License BSD3
Copyright (c) 2006-2008 Duncan Coutts
Author Duncan Coutts <>
Maintainer Duncan Coutts <>
Category Text
Source repo head: darcs get
Uploaded Sat Jan 8 18:39:26 UTC 2011 by DuncanCoutts
Updated Fri May 29 21:26:19 UTC 2015 by HerbertValerioRiedel to revision 1   [What is this?]
Distributions Debian:, LTSHaskell:, NixOS:, Stackage:, openSUSE:
Downloads 5551 total (53 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Readme for iconv-

[back to package description]

This is a Haskell binding to the iconv() C library function.

The only module exported is Codec.Text.IConv, which provides a single

-- | Convert fromCharset toCharset input output
convert :: String -> String -> Lazy.ByteString -> Lazy.ByteString

where fromCharset and toCharset are the names of the input and output
character set encodings, and input and output are the input and output text
as lazy ByteStrings.

An example program to convert the encoding of an input file, similar to the
iconv program, is given in examples/hiconv.hs

Character set encodings

To see a list of encoding names which are known by your operating system,
run "iconv --list" in a shell. Likely encodings are listed on the libiconv
web page:

Availability of iconv()

The iconv(3) function conforms to POSIX.1-2001. It is provided by the GNU C

On systems which do not have a native iconv() implementation you may need to
install libiconv: