Tell me please, comrades. I come to some page with the query of the form index.php?gost=ГОСТ%C2%A0Р%C2%A050571.5.51−2013
here's the code
$query = $_GET['gost']; echo '<meta charset="utf-8">'; echo '1 '.$query.'<br>'; // ВИЖУ $query = preg_replace('/[\x00-\x1F\x7F\xA0]/u', ' ', $query); echo '2 '.$query.'<br>'; // ВИЖУ $query = preg_replace('/\s+/','%',$query); $query = iconv('UTF-8', 'windows-1251', $query); echo '3 '.$query; // ПУСТО
Item 3 is empty.
However, if I come with the query index.php?gost=ГОСТ%C2%A0Р%20ИСО/МЭК%2074981-99
, then all 3 items are displayed normally.