fork from http://hackage.haskell.org/package/iconv