Shift_JIS encoding

Venkat V <[email protected]> Sat, 9 May 2015 00:12:53 +0530
Newsgroups gmane.comp.php.internationalization
Message-ID <CAFFu=0Pnq4XNR_Mx_G8GGXoWYrGCusDoFCLjFOH3u8fGEQz+Uw@mail.gmail.com>
--047d7b3439185b11b905159665cb
Content-Type: text/plain; charset=UTF-8

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

--047d7b3439185b11b905159665cb--