What's the difference between iconv()
and mb_convert_encoding()
in PHP? Does one perform better, faster, etc. ( eg. with specific encodings )? In what situations would one be preferred over the other?
Here's what I think I know already:
iconv()
- included with most installs of PHP.
- when characters that can't be mapped to the new character set are found, you can specify if they are converted to a 'similar' character, or ignored.
mb_convert_encoding()
- usually requires installing the php-mbstring extension.
- is able to handle
HTML-ENTITIES
, converting to and from web hex codes.
Are there other differences?