From 0c38cbea434425b79a9eb7b9665a5b8a4cf37f11 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 27 Jul 2005 10:04:52 +0000 Subject: [PATCH] fixed wrong charset in xajax responses --- phpgwapi/inc/xajax.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/xajax.inc.php b/phpgwapi/inc/xajax.inc.php index 3a7a53f363..997aef17ba 100644 --- a/phpgwapi/inc/xajax.inc.php +++ b/phpgwapi/inc/xajax.inc.php @@ -45,7 +45,9 @@ class xajaxResponse // Constructor function xajaxResponse() { - $this->xml = ""; + $this->charset = is_object($GLOBALS['egw']->translation) ? $GLOBALS['egw']->translation->charset() : 'UTF-8'; + //error_log("xajaxResponse: charset=$this->charset"); + $this->xml = "charset\"?>"; $this->xml .= ""; } @@ -439,7 +441,7 @@ class xajax $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; exit();