cvs: php4 /ext/xml compat.c

From: Date: Fri, 16 May 2003 23:21:48 +0000
Subject: cvs: php4 /ext/xml compat.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20979@lists.php.net to get a copy of this message
moriyoshi Fri May 16 19:21:48 2003 EDT Modified files: /php4/ext/xml compat.c Log: Allow libxml to detect the document encoding if encoding parameter passed to XML_ParserCreate_MM is null. Index: php4/ext/xml/compat.c diff -u php4/ext/xml/compat.c:1.6 php4/ext/xml/compat.c:1.7 --- php4/ext/xml/compat.c:1.6 Wed May 7 16:53:23 2003 +++ php4/ext/xml/compat.c Fri May 16 19:21:48 2003 @@ -276,7 +276,11 @@ parser->mem_hdlrs.free_fcn(parser->parser); return NULL; } - parser->parser->encoding = xmlStrdup(encoding); + if (encoding != NULL) { + parser->parser->encoding = xmlStrdup(encoding); + } else { + parser->parser->charset = XML_CHAR_ENCODING_NONE; + } if (sep != NULL) { parser->namespace = 1; parser->_ns_map = xmlHashCreate(10);

« previous php.cvs (#20979) next »