Re: Re: [RFC] Use default_charset As Default Character Encoding
| From: | Joe Watkins | Date: | Fri, 01 Nov 2013 01:24:41 +0000 |
| Subject: | Re: Re: [RFC] Use default_charset As Default Character Encoding | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69991@lists.php.net to get a copy of this message | ||
On 10/31/2013 09:21 AM, Yasuo Ohgaki wrote:
Hi Joe, On Thu, Oct 31, 2013 at 6:07 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: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 JoeOn Thu, Oct 31, 2013 at 5:31 PM, Joe Watkins <krakjoe@php.net> wrote: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') {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.$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