Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78367 invoked from network); 15 Oct 2016 12:31:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Oct 2016 12:31:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain telia.com from 81.236.60.154 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.154 v-smtpout1.han.skanova.net Received: from [81.236.60.154] ([81.236.60.154:46182] helo=v-smtpout1.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/02-59423-DA122085 for ; Sat, 15 Oct 2016 08:31:42 -0400 Received: from [192.168.7.7] ([195.198.188.252]) by cmsmtp with SMTP id vO7mbhfrYOmUnvO7mbqPSG; Sat, 15 Oct 2016 14:31:38 +0200 To: Andrea Faulds , PHP internals References: <1E.58.41968.0CD00085@pb1.pair.com> Message-ID: <5ccf316a-dac1-2821-b183-a0415fdd7af5@telia.com> Date: Sat, 15 Oct 2016 14:31:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1E.58.41968.0CD00085@pb1.pair.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfK4MVkxMy5Wf5nEk079eQBjWt+aU30HLUUzBvh7dLPCLgOOJhlv5AZs3iPj0gO9lx4Ix4x6MT6cKst8ZYOQVQqo3UKgIC0vUcfLi4I90raTyv6cXMU4s fWitntJYlaJKGz3kD+/uZ/RhxF+XbO7uxpVPyIApEipWovqo+Z4tMU6DuKXzDrOk3ApyxL/h4Ccy7avZvcG8TLSlpc3MwHtZtGk= Subject: Re: [PHP-DEV] Moving utf8_encode() and utf8_decode() to ext/standard From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2016-10-14 kl. 00:42, skrev Andrea Faulds: > Hi, > > This is a follow-up to what I wrote in the utf8_encode()/utf8_decode() > discussion earlier: > > Andrea Faulds wrote: >> I would propose something else: remove them from the XML extension, and >> move them somewhere more fitting, like ext/intl, ext/mbstring or maybe >> ext/standard. These are generic functions which work on any text, not >> just XML, and their inclusion is mutually superfluous with respect to >> XML: if you're decoding XML, you don't necessarily need to convert text >> to/from UTF-8, and if you're converting text to/from UTF-8, you don't >> necessarily need to deal with XML. Plus, given the names alone, you'd >> have no idea they're part of the XML extension. > > Since these functions are generic string functions that have no > dependency on libxml, I've written a patch to move them to > ext/standard, and simplified their code a little bit. > > Pull request here: https://github.com/php/php-src/pull/2160 > > This doesn't currently do any function renaming or aliasing, but I > should probably do that next. Plus, the manual still needs updating. > > Are there any objections to this move? There'd be no > backwards-compatibility break. > > Thanks! > I think this is a very good way forward. At the moment we are planning a migration project going from PHP 5.x to 7.x where the content is mostly coded in ISO-8859-1 and in some places UTF8. We use these functions to convert when needed, so removing them is in my eyes a bad idea since it would hamper our effort to migrate towards PHP 7. And we want to focus on one thing at the time. Meaning, not mixing PHP 7 & UTF8 migration. We can also not justify the cost for moving content to UTF8 since there is no added value for our end-users in it. So please keep these functions and don't remove them! Regards //Björn Larsson