- Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
- Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
(yoarvi@gmail.com, Derick)
+- Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
- Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
- Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)
dom_object *intern;
dom_doc_propsptr doc_props;
char *file;
+ const char *encoding;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) {
return;
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
- /* encoding handled by property on doc */
+
+ encoding = (const char *) htmlGetMetaEncoding(docp);
doc_props = dom_get_doc_props(intern->document);
format = doc_props->formatoutput;
- bytes = htmlSaveFileFormat(file, docp, NULL, format);
+ bytes = htmlSaveFileFormat(file, docp, encoding, format);
if (bytes == -1) {
RETURN_FALSE;