On 03.03.2020 23:16, Christoph M. Becker wrote:
> For users learning PHP, and also for new code, it would be beneficial to
> not have to decide which of these extensions to use; if they need
> character encoding conversion, iconv() would be preferable; for more
> general string functionality, it would be ext/mbstring.

>From my experience iconv does not support all charsets e.g. UTF7-IMAP or
ISO-2022-JP-MS, that mbstring does.

Also, I have a case in which iconv_* functions were much much slower
than mbstring. See wordwrap implementation in
https://github.com/roundcube/roundcubemail/blob/master/program/lib/Roundcube/rcube_mime.php#L589

I did not do any performance comparison for iconv() function itself and
I'm not sure it should be considered preferable. I saw a lot of
performance improvements in mbstring in the last year or so. Do anyone
have some perf. comparison for charset conversion cases?

-- 
Aleksander Machniak
Kolab Groupware Developer        [https://kolab.org]
Roundcube Webmail Developer  [https://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to