Revert "Use iconv for conversion"

This reverts commit 5f45020aabb604a08600988f3f5eb520c0ecb22e.