Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58857 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20781 invoked from network); 12 Mar 2012 07:32:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2012 07:32:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:63701] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/00-20445-096AD5F4 for ; Mon, 12 Mar 2012 02:32:33 -0500 Received: by lahl5 with SMTP id l5so3623505lah.29 for ; Mon, 12 Mar 2012 00:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=nz2Olx6f3wZrpeUA7fmFX4KFu1e30z/jC+X41AGUPqI=; b=zUzbiz913zZpY9AkNTJ9H9pZkq5cY/ClCVmlE+78ssQmVf5Z/KGqp1lPCebY/J83WB UJCVLPOobLEUMoJvoEBvxbrIduKFgXUMAQ5R+yZPYUTtk3Ygr62VTiBWVjhG47HJYm88 wlLD/CkI5t6TZZsfUKdbqrwF0aKMqGCVyryBHqW8OumD1Mwr7SjraeMwE64Bw174vfT5 e8cLKGzzI87ZCKxc4+aOqnTgZOl8mFfdhnaeAXPNC9NxmpXiMLxVfYtk+78eZPqtzQLM N4XQgWd5ht8GecJ1ctimCbKQkox+QaRsrI7OdyNdB1KSDfzYnp3Z/gyF8LRF+ji/HNrk nPPg== Received: by 10.112.48.130 with SMTP id l2mr4311442lbn.41.1331537549311; Mon, 12 Mar 2012 00:32:29 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.112.20.73 with HTTP; Mon, 12 Mar 2012 00:32:09 -0700 (PDT) In-Reply-To: <4F5DA152.10109@sugarcrm.com> References: <4F5D9C77.3030000@lerdorf.com> <4F5DA152.10109@sugarcrm.com> Date: Mon, 12 Mar 2012 15:32:09 +0800 X-Google-Sender-Auth: lvF8B_K_cuPpqni-Yns3ivxzo4Q Message-ID: To: Stas Malyshev Cc: Rasmus Lerdorf , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] default charset confusion From: laruence@php.net (Laruence) On Mon, Mar 12, 2012 at 3:10 PM, Stas Malyshev wro= te: > Hi! > > >> What we really need is what we added in PHP 6. A runtime encoding ini >> setting that is distinct from the output charset which we can use here. >> That would allow people to fix all their legacy code to a specific >> runtime encoding with a single ini setting instead of changing thousands >> of lines of code. I propose that we add such a directive to 5.4.1 to >> ease migration. > > > One more charset INI setting? I'm not sure I like this. We have tons of I= NIs > already, and adding a new one each time we change something makes both > writing applications and configuring servers harder. > But as the manual says, ISO-8859-1 and =C2=A0UTF-8 =C2=A0are the same for > htmlspecialchars() - is it wrong? If yes, what exactly is the different > between old and new behavior? I tried to read #61354 but could make littl= e > sense out of it, it lacks expected result and I have hard time understand= ing > what is the problem there. Could you explain? Hi: if the argument string passed to htmlspecialchars is not in the charset the htmlspecialchars expected(default is UTF8, and there is only one way out is specific the third argument), a empty string will returned without any notice or warning ;) thanks > > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --=20 Laruence =C2=A0Xinchen Hui http://www.laruence.com/