lib/util/charcnv Move iconv handle setup in common