packages feed

iconv 0.4.1.2 → 0.4.1.3

raw patch · 5 files changed

+72/−43 lines, 5 filesdep ~basedep ~bytestring

Dependency ranges changed: base, bytestring

Files

Codec/Text/IConv/Internal.hs view
@@ -49,6 +49,8 @@ import System.IO.Unsafe (unsafeInterleaveIO, unsafePerformIO) import System.IO (hPutStrLn, stderr) import Control.Exception (assert)+import Control.Applicative+import Control.Monad (ap)  import Prelude hiding (length) @@ -201,6 +203,13 @@         -> Buffers         -> IO (Buffers, a)   }++instance Functor IConv where+  fmap f a = a >>= returnI . f++instance Applicative IConv where+  pure  = returnI+  (<*>) = ap  instance Monad IConv where   (>>=)  = bindI
− README
@@ -1,40 +0,0 @@--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:--  http://www.gnu.org/software/libiconv/
+ README.md view
@@ -0,0 +1,48 @@++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 :: EncodingName -> EncodingName -> 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. For example:++     import qualified Codec.Text.IConv as IConv+     import qualified Data.ByteString.Lazy as BS+     +     main = do+       -- read UTF8, but convert to UTF32 internally+       content <- fmap (IConv.convert "UTF-8" "UTF-32") (BS.readFile file)+       ...++An [example program], similar to the iconv program, is included.++[example program]: 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 site.++[libiconv]: 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].++[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].+
+ changelog.md view
@@ -0,0 +1,12 @@+0.4.1.3 Duncan Coutts <duncan@community.haskell.org> June 2015++ * Fixed building with GHC 7.10++0.4.1.2 Duncan Coutts <duncan@community.haskell.org> December 2013++ * Fixed building with GHC 7.8++0.4.1.1 Duncan Coutts <duncan@community.haskell.org> October 2012++ * Fixed building with bytestring 0.10+
iconv.cabal view
@@ -1,6 +1,6 @@ name:            iconv-version:         0.4.1.2-copyright:       (c) 2006-2008 Duncan Coutts+version:         0.4.1.3+copyright:       (c) 2006-20015 Duncan Coutts license:         BSD3 license-file:    LICENSE author:          Duncan Coutts <duncan@community.haskell.org>@@ -11,7 +11,7 @@                  for string encoding conversion. build-type:      Simple cabal-version:   >= 1.6-extra-source-files: README examples/hiconv.hs cbits/hsiconv.h+extra-source-files: changelog.md README.md examples/hiconv.hs cbits/hsiconv.h  source-repository head   type: darcs