Charset issue

Hi, I run into a problem regarding charset configuration using dhtmlxConnector. Some times I got a Error Loading XML in my grid. It occurs on my Linux machine (my Windows works fine). After upgrading base_connector.php from a post here in this forum (viewtopic.php?f=19&t=15570). I had to make this changes:


Line 18: private $encoding; // FCV

public function __construct($start, $end = "", [b]$encoding=""[/b]){ // FCV
	$this->start = $start;
	$this->end = $end;
	$this->type = "xml";
	[b]$this->encoding = $encoding;[/b] // FCV

Line 36:
public function output($name=“”, $inline=true){
// FCV
if (“”!=$this->encoding)
$encodingtxt=“; charset=”.$this->encoding;
// FCV

if ($this->type == “xml”)
header("Content-type: text/xml $encodingtxt "); // FCV

	echo $this->__toString();

Line 540 (±):

protected function output_as_xml($res){
	$start="<?xml version='1.0' encoding='".$this->encoding."' ?>".$this->xml_start(); 
	$out = new OutputWriter($start, $end,$this->encoding); // FCV
	$this->event->trigger("beforeOutput", $this, $out);
} (5.33 KB)

Sounds as a usefull addition.
Similar logic will be added in to the main codebase.