Get strange behaviour when one of two UPPERCASE Cyrillic symbols "И" and "Э" used inside url link:
file_get_contents("http://localhost/И")
fopen("http://localhost/И", "r")
Both return below error, but server even had not been called:
failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error
Anyone knows is this known issue? Is there bug reported?
Seems it is fixed in PHP8, but why this error happens?
PS. This is not about adding Headers to request (I tried) - call not even happens.
Update:
Checked local nginx logs, and that really call server, and this is what I have for both symbols - php treat second part of unicode symbol as "_":
"GET /\xD0_ HTTP/1.0" 500 <---- php7-
"GET /\xD0\x98 HTTP/1.0" 404 <---- php8
Update 2: I found that not only these two symbols have such problem in PHP 7, but every symbol that ends either on "98" or on "ad" in hex code in UTF-8 table, here are examples of other symbols with the same behaviour:
file_get_contents("http://localhost/ϭ"); // cf ad
file_get_contents("http://localhost/Θ"); // ce 98
file_get_contents("http://localhost/Ҙ"); // d2 98
file_get_contents("http://localhost/ј"); // d1 98
file_get_contents("http://localhost/ѭ"); // d1 ad
file_get_contents("http://localhost/Ә"); // d3 ad
file_get_contents("http://localhost/‘"); // e2 80 98
file_get_contents("http://localhost/ĭ"); // c4 ad
file_get_contents("http://localhost/Ę"); // c4 98