function serializeDebug($charset_encoding='')
		{
			// Tough encoding problem: which internal charset should we assume for debug info?
			// It might contain a copy of raw data received from client, ie with unknown encoding,
			// intermixed with php generated data and user generated data...
			// so we split it: system debug is base 64 encoded,
			// user debug info should be encoded by the end user using the INTERNAL_ENCODING
			$out = '';
			if ($this->debug_info != '')
			{
				$out .= "<!-- SERVER DEBUG INFO (BASE64 ENCODED):\n".base64_encode($this->debug_info)."\n-->\n";
			}
			if($GLOBALS['_xmlrpc_debuginfo']!='')
			{

				$out .= "<!-- DEBUG INFO:\n" . xmlrpc_encode_entitites(str_replace('--', '_-', $GLOBALS['_xmlrpc_debuginfo']), $GLOBALS['xmlrpc_internalencoding'], $charset_encoding) . "\n-->\n";
				// NB: a better solution MIGHT be to use CDATA, but we need to insert it
				// into return payload AFTER the beginning tag
				//$out .= "<![CDATA[ DEBUG INFO:\n\n" . str_replace(']]>', ']_]_>', $GLOBALS['_xmlrpc_debuginfo']) . "\n]]>\n";
			}
			return $out;
		}