Iconv::new(encoding_to, encoding_from)
to create new iconv object.
If you need UTF-8 decoder just for reading text files which are not encoded in UTF-8,
ToUTF8Conv::new(encoding_from)
will be suit.
// suppose `input` is cp932 encoded text which has the type (&[u8])
let mut iconv = Iconv::new("utf-8", "cp932").unwrap();
let mut buf = Vec::new();
iconv.convert(&input, &mut buf);
// now `buf` has UTF-8 encoded text
let output_utf8 = String::from_utf8(buf);