Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95183 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44237 invoked from network); 15 Aug 2016 10:49:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2016 10:49:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:37781] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/80-36656-14E91B75 for ; Mon, 15 Aug 2016 06:49:37 -0400 Received: by mail-wm0-f50.google.com with SMTP id i5so95575392wmg.0 for ; Mon, 15 Aug 2016 03:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=USRoO1j6IOd2sTHRhtMsMPWPDOOVPlDJEFnnS7459Vo=; b=TUe9Tv0WoKvq8Hq3F1FpLzWlFbZiNeOKNVc3BoXLuc4XNtvOy0We12F67uBoCYJDRC prvEltZuNY8pYtz1jhtFiyb6xePGp3ZkoSm3+MyGim64eAI2ttYplIP8Ze5YB8wAHXq8 x1n80uTSVXiNE6KeKXQ2W49LFktOOruHXDF2Bbwx+nMJZ4LDLuM7N+BV3jrJxQ9w6xN/ Gy22cyRq232UCsDzs0yeeFR3eAb1OvXL82X7ARx3r7N58eQex1KffNpGoTzzYsMkj07B 2d1sfT+Q6PsYhhm1NDUbKyLv+KwdnPnykfEYQbi/2ftUqYyatE2nrEFRD4j/FEkHyf0B wVSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=USRoO1j6IOd2sTHRhtMsMPWPDOOVPlDJEFnnS7459Vo=; b=GwCOsF+FS8LzsrVvejx1JDk0W77hXtps1Irl9w0qDr7QeLg8WhHyzdB0+KuWEvdFox HRij7Y+Zbwsy2SKwQ+lHHnSmFpOc4QSlCBfCI+UQrpBxvYdcfej/gpC2xZu/UOY2hmhD vg39p7UG9w678t7YVoDEm+uK64APeBT6nxl1dCfUQglKfS1oXbaDfKVWKvhyxQFBmdGz Q/vPh/hHRy4Tf5xL6bFeV71Lkay/6UEQKHFaFNQeZvY80sMGfM02twG58Fx55+4vZj+r yMaAWuuO4ZvWbzl9GhUR+3Bp40bXkGupb723r0I2TNeLhf0E/WiP81Va8sgpF2JgPNXi 9lnQ== X-Gm-Message-State: AEkoout9pkE3aTbBKA+ubZoeIy5IalaoNdcHvIY0/JVSiqS19LgjvwqGPZ/cZfzzck3fiQ== X-Received: by 10.28.111.213 with SMTP id c82mr13706094wmi.47.1471258174650; Mon, 15 Aug 2016 03:49:34 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id o2sm20926358wjo.3.2016.08.15.03.49.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Aug 2016 03:49:33 -0700 (PDT) To: internals@lists.php.net References: <6163e94b-9b42-0049-1346-3e7f790801a2@gmail.com> Message-ID: Date: Mon, 15 Aug 2016 11:47:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <6163e94b-9b42-0049-1346-3e7f790801a2@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode() From: rowan.collins@gmail.com (Rowan Collins) On 15/08/2016 06:26, Stanislav Malyshev wrote: > Hi! > >> Hi all, >> >> utf8_decode() and utf8_encode() are not needed and causing >> problems than solving. > > Why you think they are not needed? I'm guessing this came about from their mention on another thread. To quote myself: > utf8_decode()/utf8_encode are, at best, extremely misleading names. > Many uses of them in my experience go something like this: "I have an > encoding problem, it's something to do with UTF-8, I'll try > utf8_encode; hm, that didn't work, I'll try utf8_decode instead". They are certainly used in many, many places; but I would wager that almost all of those uses are broken because they make no effort to confirm that 8859-1 is the right source / target encoding. I think deprecating (but not removing) them might be sensible, because it would discourage this broken logic. They are also trivially polyfillable; and again, anyone doing so will probably realise they misunderstood them and shouldn't be using them in the first place. Regards, -- Rowan Collins [IMSoP]