1

so the problem is strange, cause it's happening on some systems only.

If you have this line:

parse_url('/€?€#€')

On local system with PHP version 7.0.4 it gives me the following result:

array(3) {        
  ["path"]=>      
  string(4) "/▒_▒"
  ["query"]=>     
  string(3) "▒_▒" 
  ["fragment"]=>  
  string(3) "▒_▒" 
}     

Something like that is experienced here:

https://www.functions-online.com/parse_url.html

Enter in the $url box:

/€?€#€

But here it's working just fine, although the PHP version is the same as on my machine: http://sandbox.onlinephpfunctions.com/

Any idea why is that happening?

The expected parsed url result should be:

array(3) {
  ["path"]=>
  string(4) "/€"
  ["query"]=>
  string(3) "€"
  ["fragment"]=>
  string(3) "€"
}

EDIT:

File encoding is UTF-8, PHP internal encodings are also UTF-8, everything that can be set on the server is already UTF-8.

vuryss
  • 1,270
  • 8
  • 16

0 Answers0