Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 182 invoked from network); 15 Aug 2016 19:47:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Aug 2016 19:47:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.169 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.169 mail-pf0-f169.google.com Received: from [209.85.192.169] ([209.85.192.169:35625] helo=mail-pf0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/3A-36656-84C12B75 for ; Mon, 15 Aug 2016 15:47:20 -0400 Received: by mail-pf0-f169.google.com with SMTP id x72so19592012pfd.2 for ; Mon, 15 Aug 2016 12:47:20 -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=3zyDz2vpOAHuBkFotE2D9kCX5kiLl7YegKJ3w6Iz+rA=; b=G1d+vlAgA7DoIu6YCTo8mXLzjVbym5Qt+5YLK03emy42DkIEniLppGFqzwnZHRnwqo NzqDUhSNRBhviPj4vaxZ2sz0Ke80fGgsp7GQBlrlI7WiGKX4tB063aslGKjPt+BmuoQh AM+QVbEoygHIvoNAxgbuMnCKV2GEEAHTdD/RlKF4mCkeOszNPHBtXHZNQHI/1ZnKFrrs RvEPlyVjAlbkNF2KRfRxDYeSwEATrZUlacoFN5kvnWElgq0b7fsPrb2sGr8PHuKeH84p hhkdhl2D7E5CNe1vTHuypd4eTstiqp8uk69m+2nIJhQKwyWk+xFkFeRUH9m6BSE1P9Hu DSWw== 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=3zyDz2vpOAHuBkFotE2D9kCX5kiLl7YegKJ3w6Iz+rA=; b=SrvAlL/af64TS+S1nG8YcK+/qFRMwPICCu80+QwIC+csu+VN+qhd11/u4LVFPi4D7O ImclZjxIO1WCTksWfZoColuBLNLK1micY4i+50xdGiBk78e0dEw2v2mIIYB4zfd+VLgo l3gOhZvU044h6Zbsx6doPTPgn8qbaPXTw90V57OYwbYxMwV/7ZyuNXVeDDGKEHO1ARHS LsVLHfCkbqSBaVYzHHA/FhjPXuV9Nx9+h12Zjj5IwtBcEJUtOib/SLUNUluCrUYxHEXE 1W0UGqaykzK7yFifecMBPzCxQRfuwl5vyp7lCbpBsGpsszlu4B+xYLt182GAvjc/S7nG Eing== X-Gm-Message-State: AEkoousxhwQQMXnHKYUCJaTK731dnIvduksqoefqJdOooFFOa6dsrn+ihMZiShqXO5pmBg== X-Received: by 10.98.131.8 with SMTP id h8mr6169420pfe.124.1471290437704; Mon, 15 Aug 2016 12:47:17 -0700 (PDT) Received: from Stas-Air.local (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id dz13sm33422915pac.44.2016.08.15.12.47.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Aug 2016 12:47:16 -0700 (PDT) To: Rowan Collins , internals@lists.php.net References: <6163e94b-9b42-0049-1346-3e7f790801a2@gmail.com> Message-ID: <60e1deb8-a03b-5fa3-a72f-d408be7f6ff4@gmail.com> Date: Mon, 15 Aug 2016 12:47:14 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Remove utf8_decode() and utf8_encode() From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >> 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". I still think if one does it without even reading one-line description in the manual, they deserve what they get. I know people will click on any binary that says "please click on me, honestly I'm not a trojan" but programmers are supposed to know a little better? Like not running functions they don't know what they do, even without reading one-line description? > 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. Deprecating - maybe, since there are better alternatives to it anyway (like iconv or recode), but I don't see much point in removing unless we have no usage at all. -- Stas Malyshev smalyshev@gmail.com