Re: parse_url and the charsets ...
| From: | Simon Schick | Date: | Fri, 15 Jan 2016 08:17:30 +0000 |
| Subject: | Re: parse_url and the charsets ... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325351@lists.php.net to get a copy of this message | ||
On Thu, Jan 14, 2016 at 9:06 AM, Simon Schick <simonsimcity@gmail.com> wrote:
> Hi, all
>
> I lately ran into the issue, that the method parse_url() does not give
> the expected result if you pass in a URL like
> "http://localhost/2 -
> English title 2 (fi) здесь.mp3?download=1".
>
> Here is the code I tried:
>
> var_dump(parse_url("http://localhost/2 - English title 2
> (fi)
> здесь.mp3?download=1"));
>
> And here is the result I got when running it on my local machine:
>
> array(4) {
> ["scheme"]=>
> string(4) "http"
> ["host"]=>
> string(9) "localhost"
> ["path"]=>
> string(41) "/2 - English title 2 (?_) зде?_?_.mp3"
> ["query"]=>
> string(10) "download=1"
> }
>
> But I more expected to get a result like this:
>
> array(4) {
> ["scheme"]=>
> string(4) "http"
> ["host"]=>
> string(9) "localhost"
> ["path"]=>
> string(41) "/2 - English title 2 (fi) здесь.mp3"
> ["query"]=>
> string(10) "download=1"
> }
>
> What setting in PHP is the one being responsible for this change?
> Because I saw it working in every PHP version on 3v4l:
> https://3v4l.org/5hXSH
>
> Bye,
> Simon
There were already two bug-reports related to this:
* https://bugs.php.net/bug.php?id=52923
* https://bugs.php.net/bug.php?id=68296
I added my notes to #52923 and linked both together.
Bye,
Simon