Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95359 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39040 invoked from network); 22 Aug 2016 01:53:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 01:53:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:45317] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/20-35246-51B5AB75 for ; Sun, 21 Aug 2016 21:53:27 -0400 Received: (qmail 98775 invoked by uid 89); 22 Aug 2016 01:53:21 -0000 Received: from unknown (HELO mail-qk0-f174.google.com) (yohgaki@ohgaki.net@209.85.220.174) by 0 with ESMTPA; 22 Aug 2016 01:53:21 -0000 Received: by mail-qk0-f174.google.com with SMTP id t7so76658190qkh.1 for ; Sun, 21 Aug 2016 18:53:21 -0700 (PDT) X-Gm-Message-State: AEkoouuqFOm1xq/Pwu414EEY6Le9ACclDTQ5jNOci243IHxJ3rkGONb0D8nadxplFd4JuttSPm08Tzg82UlQeg== X-Received: by 10.55.76.17 with SMTP id z17mr20574746qka.96.1471830795126; Sun, 21 Aug 2016 18:53:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.85.242 with HTTP; Sun, 21 Aug 2016 18:52:34 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Aug 2016 10:52:34 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode() From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi all, On Sat, Aug 20, 2016 at 12:24 AM, Rowan Collins wrote: > On 19/08/2016 16:12, Pierre Joye wrote: >> >> I am against removing them, now or in 8.x. this is the kind of things that >> makes migrations painful. They are broken on some cases? Fix them maybe? > > > The thing that is broken about the functions is not the functionality, but > the name. > > I suppose you could change them to recode Windows CP-1252, which is more > common than latin-1 and mostly compatible with it, but that still breaks > European sites using ISO 8859-15 (latin 9), and frankly would just further > reinforce the common misapprehensions around "extended ASCII" and "decoding > UTF8". > > What do you think of making them aliases of the new names latin1_to_utf8 and > utf8_to_latin1? We needn't even deprecate the old names, but at least it > would draw more attention to what they actually do? I agree the name is problematic, not what it does. Having aliases is good solution. It worked well in pgsql module. Old names are still usable and I think almost all codes use new names now. I'll update the RFC to have aliases rather than removing. Since these are XML module functions, the name would be xml_latin1_to_utf8() and xml_utf8_to_latin1(). Suggestions for names are appreciated. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net