Если интересно, то вот как у меня было в моем комплитере:
index.php
Цитата:
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
$("#search2").autocomplete("autocomplete.php", {});
|
autocomplete.php
Цитата:
|
header('Content-Type: text/html; charset=utf-8');
.....
$q = isset($_GET["q"]) ? $_GET["q"] : "";
.......
if(mysql_num_rows($rs) != 0)
{
while($row = mysql_fetch_assoc($rs))
{
...
$content = trim($row["content"]);
$content = iconv('windows-1251', 'UTF-8', $content);
$number_of_people = trim($row["number_of_people"]);
$res = mb_strpos(mb_strtolower($content, "UTF-8"), mb_strtolower($q, "UTF-8"));
if($res !== false && $res == 0) print $content . "|" . $number_of_people . "|" . $id . "\n";
}
}
|