fixed wrong charset in xajax responses

This commit is contained in:
Ralf Becker 2005-07-27 10:04:52 +00:00
parent 293145ae00
commit 0c38cbea43

View File

@ -45,7 +45,9 @@ class xajaxResponse
// Constructor // Constructor
function xajaxResponse() function xajaxResponse()
{ {
$this->xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; $this->charset = is_object($GLOBALS['egw']->translation) ? $GLOBALS['egw']->translation->charset() : 'UTF-8';
//error_log("xajaxResponse: charset=$this->charset");
$this->xml = "<?xml version=\"1.0\" encoding=\"$this->charset\"?>";
$this->xml .= "<xajax>"; $this->xml .= "<xajax>";
} }
@ -439,7 +441,7 @@ class xajax
$sResponse = call_user_func_array($sFunctionName, $aArgs); $sResponse = call_user_func_array($sFunctionName, $aArgs);
} }
header("Content-type: text/xml; charset=utf-8"); header("Content-type: text/xml; charset=$this->charset");
print $sResponse; print $sResponse;
exit(); exit();