when I'm trying to _GET url with urlencoded value (some cyrilic word):
http://example.com/?action=search&q=%E0%E2%F2%EE%EC%EE%E1%E8%EB%FC
after decoding:
echo urldecode($_GET['q']); // it prints: ���������
so, I need do conversion to utf-8 (because whole my application works with utf-8) via:
mb_convert_encoding($_GET['q'], "UTF-8", "windows-1251");
and it helps, but question:
Who/what says it should be EXACTLY "windows-1251" ? where from it comes? if i'll use some other languages, how I can define appropriate encoding? where is the magic?
(update): page encoding is utf-8 (update): actually, urldecode($_GET['q']) even not needed, looks like apache+php module doing everything, but, still can't understand where configs are