@hackage iconv0.4
String encoding conversion
Categories
License
BSD-3-Clause
Maintainer
Duncan Coutts <duncan@haskell.org>
Links
- Documentation
- No source repository
- Security
Versions
Installation
Dependencies (2)
- base <2.0 || >=2.2
- bytestring >=0.9 Show all…
Dependents (17)
@hackage/rating-chgk-info, @hackage/hsexif, @hackage/diohsc, @hackage/soap, @hackage/language-puppet, @hackage/acme-everything, Show all…
Package Flags
bytestring_in_base(on by default)
Codec.Text.IConv
This is a Haskell binding to the iconv() C library function.
The only module exported is Codec.Text.IConv, which provides a single function:
-- | 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:
http://www.gnu.org/software/libiconv/
Availability of iconv()
The iconv(3) function conforms to POSIX.1-2001. It is provided by the GNU C library:
http://www.gnu.org/software/libc/manual/html_node/Character-Set-Handling.html
On systems which do not have a native iconv() implementation you may need to install libiconv: