Re: [RFC] Use default_charset As Default Character Encoding

From: Date: Wed, 30 Oct 2013 23:05:52 +0000
Subject: Re: [RFC] Use default_charset As Default Character Encoding
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-69974@lists.php.net to get a copy of this message
Hi Joe, On Tue, Oct 29, 2013 at 8:15 PM, Joe Watkins <krakjoe@php.net> wrote: > I'm not sure what it is you are actually trying to achieve here ?? > I have 3 objectives in this RFC. 1. Setting charset in HTTP header is recommended since the first XSS advisory in 2000 Feb. by CERT and Microsoft. 2. There are too many encoding settings and it is better to consolidated. 3. If we have yet another multibyte string module in the future, the new settings can be used. I'll add these if I didn't write them in RFC later. I proposed "default_charset=UTF-8" years ago, but there were many users uses "ISO-8859-*"/"EUC-*"/etc at that time and we decided leave the setting to users. +1 on the 5.5 changes > > But the rest I don't really understand what the aim is, it would seem that > renaming settings, especially ones that are not actually anything to do > with the core, is just breaking compatibility for no good reason. > Encoding must be specified for proper operation. It's a security risk also. > What I could understand is a proposal to move the functionality provided > by mbstring/iconv into core and introduce dot script_encoding complementary > settings: > > zend.input_encoding > zend.output_encoding > > I could understand this kind of proposal being aimed at 6. > I don't think Zend engine will have multibyte char handling feature at least any time soon. Currently, Zend engine has zend multibyte option, but it's only for encoding that is not compatible ISO-8859-1. (e.g. SJIS, BIG5. These encodings has \ in chars and engine would not work script written by these encodings with zend multibyte off.) However, having encoding settings in the engine will work also even if it does not use them. It may be a good idea have these settings in the engine. I'm +1 for this idea. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net

« previous php.internals (#69974) next »