Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96359 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33760 invoked from network); 13 Oct 2016 22:42:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Oct 2016 22:42:10 -0000 X-Host-Fingerprint: 2.221.200.190 unknown Received: from [2.221.200.190] ([2.221.200.190:29991] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/58-41968-0CD00085 for ; Thu, 13 Oct 2016 18:42:10 -0400 Message-ID: <1E.58.41968.0CD00085@pb1.pair.com> To: internals@lists.php.net References: Date: Thu, 13 Oct 2016 23:42:05 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 2.221.200.190 Subject: Moving utf8_encode() and utf8_decode() to ext/standard (was: [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode()) From: ajf@ajf.me (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! -- Andrea Faulds https://ajf.me/