Весь день убил на поиски решений проблемы с кириллицей. Так ничего и не нашел
PHP код:
require_once("config.php");
require_once("ajax/xajax_core/xajax.inc.php");
$xajax = new xajax();
$xajax->setCharEncoding("windows-1251");
$xajax->registerFunction("sendee");
$xajax->processRequest();
function sendee($aFormValues,$id) {
global $mysql_connect, $mysql_selectdb, $time;
$objResponse = new xajaxResponse();
$id = intval($id);
$mess = htmlspecialchars(strip_tags($aFormValues['messtext']));
$query = "INSERT INTO chat (user_id,message,type,time) VALUES ('$id','$mess','0','$time')";
$doQuery = mysql_query($query);
$query = "SELECT * FROM chat WHERE user_id LIKE '$id' ORDER BY id DESC LIMIT 0,20";
$doQuery = mysql_query($query);