Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58892 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37359 invoked from network); 12 Mar 2012 20:20:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2012 20:20:04 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:46015] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/F4-13375-27A5E5F4 for ; Mon, 12 Mar 2012 15:20:03 -0500 Received: by yhfq11 with SMTP id q11so3373141yhf.29 for ; Mon, 12 Mar 2012 13:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xsBtyAH3T+VQA6ekEcDbeZMCgGeKA956gNYUSqz/5Jg=; b=ILqu33cr61Vd8EEF6TecWQpCAllNAS2k3sWah8RRCsUfQIJtyDNIpH6TRVY0XTprdg NSFjpS0hgOWXTnqStxups/iGMHfQ9b0LzWwcHI+MJMxQudPQlHPXKVZooNDsFqvtA1ch ydffLJhTmSm/bXnIUztj68xJ1Xx53voTUcrOA0f58sESwR+ahwNeWd/K9fT3CsPHLHdR yom3r1R7O0z9Xk4Qi+HOtxQTdo7b/aBe4bmRq3SS8uN/MmB0Nvlv17G3/2TgmGAJT7cj r5Ib0/7WyjqvGZlVoGNVl6wue5xDDpxR/MgTiqjuqP925Tl9ihsr74Lb39G2CnNI+R2O 1MnQ== MIME-Version: 1.0 Received: by 10.101.176.8 with SMTP id d8mr4526166anp.56.1331583599379; Mon, 12 Mar 2012 13:19:59 -0700 (PDT) Received: by 10.146.221.14 with HTTP; Mon, 12 Mar 2012 13:19:59 -0700 (PDT) In-Reply-To: <4F5E5893.9030903@lerdorf.com> References: <4F5D9C77.3030000@lerdorf.com> <4F5DA152.10109@sugarcrm.com> <4F5DA894.8060606@lerdorf.com> <4F5DAB49.3030808@sugarcrm.com> <4F5DAFCE.8020600@lerdorf.com> <4F5E5148.4030106@sugarcrm.com> <4F5E5219.7080501@lerdorf.com> <4F5E53C3.8060502@sugarcrm.com> <4F5E5893.9030903@lerdorf.com> Date: Mon, 12 Mar 2012 21:19:59 +0100 Message-ID: To: Rasmus Lerdorf Cc: Stas Malyshev , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] default charset confusion From: pierre.php@gmail.com (Pierre Joye) hi Rasmus, On Mon, Mar 12, 2012 at 9:12 PM, Rasmus Lerdorf wrote: > If everything was UTF-8 we wouldn't have any of these issues. > Unfortunately that isn't the case. The question is what to do with apps > that need to deal with non UTF-8 data. Are we going to provide any help > to them beyond just telling them to convert everything to UTF-8? That's not really an acceptable solution, obviously. > We took steps in 5.4 to improve htmlspecialchars to understand more > encodings and we have the concept of script_encoding and > internal_encoding that is used both in the engine and in mbstring. > > Currently internal_encoding isn't checked by htmlspecialchars. If you > pass it '' it checks script_encoding and default_charset which is a bit > odd since neither directly relate to the encoding of the internal data > you are feeding to it. So maybe a way to tackle this is to use the > mbstring internal encoding when it is set as the htmlspecialchars > default when it is called without an encoding arg. That's why I would prefer to use an existing setting and clearly document it instead of creating a new ini settings with a totally different impact than the existing ones. Not sure which one would fit best tho'. Reading these last two paragraphs gave me a headache and I did not know anymore which encoding we were talking about ;-) Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org