如何从网址获取土耳其数据并在php中搜索数据库

I'm trying to build a webservice for android app. Right now it has very simple task; get search name from app send it to /test.php?pid=(searchname). It's working perfect when search has English characters. But when search has Turkish characters like

ü,ş,ğ,ç,ö

it's not working. So i decided to try in web browser. i type /test.php?pid=kırmızı (kırmızı=red in English) and press enter, PHP gets 0 result. after that I press F5 and PHP gets 51 results that contain "kırmızı". I did not change /test.php?pid=kırmızı, just press F5. This is what my server logs looks like:

GET /test.php pid=k%C4%B1rm%C4%B1z%C4%B1 HTTP/1.1 (type and enter = 0 result)

GET /test.php pid=k%FDrm%FDz%FD HTTP/1.1 (press F5 = 51 results)

i tried rawurldecode, urldecode even functions that convert "k%C4%B1rm%C4%B1z%C4%B1". But it didn't work. This is my last code:

$pid =  urldecode($_GET['pid']);
$result= odbc_exec($cx, "SELECT * FROM yorumlanan WHERE ad LIKE '%$pid%'");

This code works perfect when search has only English letters. It even works with Turkish letters when refreshing page manually. But android app does not refresh page. So it sees 0 result.