Hi, Following program fails with the message "Warning</b>: main(): Invalid Document Encoding in " on HP-UX with PHP 5.4.11 and PHP 5.4.40(both are compiled on HP-UX ) <?php header( "content-type: application/xml" ); $xml = new DOMDocument( "1.0"); $elm = $xml->createElement( "foo", "bar" ); $xml->appendChild( $elm ); $xml->encoding = "Shift_JIS"; print $xml->saveXML(); ?> Can you please clarify if this failure is because of some issue with above script or can be due to HP-UX library used to build PHP on HP-UX Thanks for the help Regards, Venkat