Re: Discussion for RFC: Set appropriate/better defaults.
| From: | Yasuo Ohgaki | Date: | Tue, 27 Jan 2015 10:40:06 +0000 |
| Subject: | Re: Discussion for RFC: Set appropriate/better defaults. | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81222@lists.php.net to get a copy of this message | ||
Hi Lester,
On Tue, Jan 27, 2015 at 6:19 PM, Lester Caine <lester@lsces.co.uk> wrote:
> On 27/01/15 02:06, Yasuo Ohgaki wrote:
> > Another example is http_build_query(). It should escape ' ' as '%20'
> > by
> > default, not '+'.
>
> The quick response is probably 'why', but I probably know the answer,
> becuase some standard has changed. The problem with this one is that
> using a '+' sign when encoding page names is so much easier to read than
> $20, and many of the systems I'm still supporting have had as a standard
> since PHP4 days. Editing stored data to cope with that change is not as
> easy as changing code, so what is easy to say in an RFC can have a lot
> more deeper implications!
I should have mentioned that urldecode() supports both '+' and '%20'.
Therefore, there is no compatibility issue as long as stored data is
decoded by urldecode().
http://3v4l.org/KcW4V
I suppose RFC 1738 user is using urldecode() as rawurldecodoe() cannot
decode '+'. So you and your users wouldn't have BC issues.
Please let me know if I'm missing something.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net