Published on 2005-07-10 13:54:05
AjaxAC is an open-source framework written in PHP, used to develop/create/generate AJAX applications. I've noticed many problems concerning AjaxAC and Middle Eastern encoding, it will be also valid for Unicode and East-Asian encoding too. The first thing is in the AjaxACApplication.class.php function sendResponseData(), you can see in the end of the function :
This will never work with Middle Eastern encoding like windows-1256. First there is no need to set Content-length, and then we should have something like that :
So to do something general, we can use the _defaultCharset parameter in the beginning and set it to the charset that we need. So if you got Javascript error just replace the default charset ( UTF-8 ) with your current charset :
Member of the PHP Magazine Network, Copyright (C) 2005-2008 phpmagazine.net All Rights Reserved