Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69991 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76868 invoked from network); 1 Nov 2013 01:24:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Nov 2013 01:24:45 -0000 X-Host-Fingerprint: 80.4.21.210 cpc22-asfd3-2-0-cust209.1-2.cable.virginm.net Received: from [80.4.21.210] ([80.4.21.210:8993] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/41-02760-CD203725 for ; Thu, 31 Oct 2013 20:24:44 -0500 To: internals@lists.php.net,Yasuo Ohgaki Message-ID: <527302D9.7020402@php.net> Date: Fri, 01 Nov 2013 01:24:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 References: <526F98C1.4040607@php.net> <527212E9.7040201@php.net> <52721544.10106@php.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.4.21.210 Subject: Re: [PHP-DEV] Re: [RFC] Use default_charset As Default Character Encoding From: krakjoe@php.net (Joe Watkins) On 10/31/2013 09:21 AM, Yasuo Ohgaki wrote: > Hi Joe, > > On Thu, Oct 31, 2013 at 6:07 PM, Yasuo Ohgaki wrote: > >> On Thu, Oct 31, 2013 at 5:31 PM, Joe Watkins wrote: >> >>> How could you override them ?? >>> >> >> It's in PoC patch. >> I made it while 5.5 was in beta, but it would work. >> >> >>> If they are removed then they cannot be referenced. >>> >>> If they are not being removed then nothing is being simplified ... >>> >> >> The most important objective is when you are using 'UTF-8' (I guess it's >> standard today) >> All you should do is >> >> default_charset='UTF-8' >> >> then PHP uses the setting anywhere it can apply. (e.g. htmlspecialchars, >> mbstring functions, etc) >> I have to work on functions, but php.ini related staff is in PoC patch. >> > > I forgot to mention that it helps i18n applications also. > > For example, preg and sqlite only accepts UTF-8 as MBCS char. Users may > write > > if (ini_get('default_charset') !== 'UTF-8') { > $str = mb_convert_encoding($str, 'UTF-8'); > } > preg, sqlite function calls here. > > It simplifies things for sure. > I'll add these in RFC later. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > Sorry, I'm a shit. I should have looked at the patch first before opening my big gob. I will look at the patch, and join in when I have a clue :) Cheers Joe