Iconv converts between character encodings. Special functionality includes the ability to transliterate characters and omit invalid characters from encodings.
Unfortunately, character encodings are widely misunderstood, and implementations differ widely. A particular program may handle even similar encodings in very different fashions.