Vsevolod Azovsky
Vsevolod Azovsky

Reputation: 115

Nginx 1.17 + PHP + Open Server: parse_url with non-English (Russian) characters (letters) leads to wrong characters conversion

[UPD]:

I've just double-checked. It behaves this way under Nginx 1.17 only. Apache works fine!

The code:

$url = '/Регистрация/?lala=123';
$res = parse_url($url);
echo '<pre>';
print_r($res);
echo '</pre>';

Under Apache everything works fine. Under Nginx 1.17 it looks like below.

enter image description here

Any ideas?

Upvotes: 1

Views: 369

Answers (1)

Dmitrii Tarasov
Dmitrii Tarasov

Reputation: 414

There is a known and still not fixed bug in PHP: https://bugs.php.net/bug.php?id=52923

Basically the function has never worked properly with UTF8. You can try alternative options, for example what was already proposed in comments

Upvotes: 1

Related Questions