Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108866 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61802 invoked from network); 5 Mar 2020 13:40:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Mar 2020 13:40:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AAEBD1804DA for ; Thu, 5 Mar 2020 03:59:50 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15716 95.128.32.0/21 X-Spam-Virus: No X-Envelope-From: Received: from mx.kolabnow.com (mx.kolabnow.com [95.128.36.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 5 Mar 2020 03:59:49 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id D15D440519 for ; Thu, 5 Mar 2020 12:59:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:received:received:received; s= dkim20160331; t=1583409587; x=1585223988; bh=JeGbL/wRovvaiGFQGCC WkmUIndCRmeHBYpOMnfvyVmE=; b=FOmhFMmVdZUydKG4SWn/zMoowfab0YOsXHw k53O63myZYxKBZPhPFhytb+1IWVkGtTXy5qMV1oChe6wHMEz+YZmoaggelKKRCaU Ubwqys4gUoBp0LMq9GEaKSNOPWT+daEa4VeBUy3smH7pV4VHuZtgk05pe+K7RLEj rrfNc08XqJsDsZo45I83vgAtt1gu3IXTzUqsHKfbgqB1MtQQ/DsmWyMCWQ08kQrg jUaMH32RGd/ol/+3GClc0sfteCsQr4akIu/5S2c4zx14Tz6rT4R7AV4a1xLa/+f7 AFTDFZUDDpXwwmr4f0dTBwt3f2K3y4OJg4fipjpob/6KL39aCOFS4ZxwpLdasC4f E44zaKIDLIi1aFydeEU+cMWg7/ukY03cv/C1WgjKhNKlF/HClbSKw03T6ZQrE3Mt efkMMi0OsXxfO57J6LV4ETKkcGzoOtY3Vpfi1NDTnx644bhgFI8y7/wFnAO5aANr 4Fti3nDgVVL1+BmJpofA0vhggtDeWmnOek8VzK/EPUlzVmyrEek6E49XiwhZoWcz saQ/v7JCwmehGlqmpImpmdQM2iDPZcrkxWFRyseX404aBpk6Qxe0MKLwIZ0vNh5S sqQi098+XnH9ZmNUDPOTmTdEzTNSPvYjewqTdgiN2+8vH1/u7lfSxq+qFWTAiuyQ t2T2a8NM= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nP6KRpZDdo59 for ; Thu, 5 Mar 2020 12:59:47 +0100 (CET) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 320DE403FB for ; Thu, 5 Mar 2020 12:59:46 +0100 (CET) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id E54152018 for ; Thu, 5 Mar 2020 12:59:46 +0100 (CET) To: internals@lists.php.net References: <09dd1b84-ed33-a059-82f9-5efd179e69d6@gmx.de> Message-ID: <0233ec6d-267f-a5e4-b114-17b4c9bbff60@alec.pl> Date: Thu, 5 Mar 2020 12:59:45 +0100 MIME-Version: 1.0 In-Reply-To: <09dd1b84-ed33-a059-82f9-5efd179e69d6@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] iconv vs. mbstring From: alec@alec.pl (Aleksander Machniak) 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