Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58909 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76195 invoked from network); 13 Mar 2012 01:34:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2012 01:34:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.161.170 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:49205] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 71/8C-13375-934AE5F4 for ; Mon, 12 Mar 2012 20:34:50 -0500 Received: by ggmb2 with SMTP id b2so21029ggm.29 for ; Mon, 12 Mar 2012 18:34:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=RY/hFPqFXtzjDBkrhKueYi4RrEPIrQCCLH4hi/2bspI=; b=BTsnC6gMIGTenf9/R2n+SUSzKuOOKwOktithgaGU14zs2OfJ5FYzXUGHcYVfLd7oWd fmCzxWoyuNUa3oCh9gZhakwiVP7kBEqKaTIkmNScnb9jtPjBbRTJkNQ+yPZQPy3Yc7HR bKufw1EHhsQFgND5HfzTPirMdPr1dpBIw5jS6/9Wp88lfYWUAuSRZdOVeLLShODtLV/R 3QfdzKuQ09Kuq6HOWLH/SYotpo64wjxrQhLDKAL6s2BO/3++OtMBM/gsSkbqW4I30GE1 +ir5D9nKmCMMvtlONxqXQJGIn3p0V3/KAgQancFW7AkEC1b7fCIvChVE93Y1hwyogg7I 20IA== Received: by 10.229.78.135 with SMTP id l7mr3182542qck.113.1331602486837; Mon, 12 Mar 2012 18:34:46 -0700 (PDT) Received: from [172.16.21.6] ([38.106.64.245]) by mx.google.com with ESMTPS id dm8sm31952298qab.18.2012.03.12.18.34.45 (version=SSLv3 cipher=OTHER); Mon, 12 Mar 2012 18:34:45 -0700 (PDT) Message-ID: <4F5EA433.3060909@lerdorf.com> Date: Mon, 12 Mar 2012 18:34:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Yasuo Ohgaki CC: PHP internals References: <4F5D9C77.3030000@lerdorf.com> <4F5DA152.10109@sugarcrm.com> <4F5DA894.8060606@lerdorf.com> <4F5DAB49.3030808@sugarcrm.com> <4F5DAFCE.8020600@lerdorf.com> <4F5E15D6.6080302@lerdorf.com> In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmBDgbfHBk/2y5IsWIsRJ0ejp8yefOnxXfGMHX3BHE+YqJBLKgYG1y/lTkJtBOZJE0XS4q+ Subject: Re: [PHP-DEV] default charset confusion From: rasmus@lerdorf.com (Rasmus Lerdorf) On 03/12/2012 05:52 PM, Yasuo Ohgaki wrote: > I always set all parameters for htmlentities/htmlspecialchars, therefore > I haven't noticed this was changed from 5.3. They may be migrating from > 5.2 or older. (RHEL5 uses 5.1) No, like I showed, moving from 5.3 to 5.4 breaks because the new default UTF-8 encoding validates the input and 8859-1 in 5.3 does not. So for charsets that are actually safe for the low-ascii chars that are significant to html htmlspecialchars() now returns false in 5.4 because their chars fail the UTF8 validity check. For people who explicitly set all the parameters nothing has changed, of course. -Rasmus