parse_url and the charsets ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux