Bug #64719 [Opn->Nab]: simplexml not show farsi or arabic

From: Date: Fri, 26 Apr 2013 10:02:24 +0000
Subject: Bug #64719 [Opn->Nab]: simplexml not show farsi or arabic
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-178646@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64719&edit=1 ID: 64719 Updated by: johannes@php.net Reported by: hooman6445 at gmail dot com Summary: simplexml not show farsi or arabic -Status: Open +Status: Not a bug Type: Bug Package: SimpleXML related PHP Version: 5.4.14 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ISO-8859-1 doesn't contain و and similar characters. Probably you have to set the file's encoding to utf-8. Previous Comments: ------------------------------------------------------------------------ [2013-04-26 09:04:31] hooman6445 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.simplexml-load-file#refsect1- function.simplexml-load-file-examples --- Test script: --------------- <?php $xmlstring = <<<XML <?xml version="1.0" encoding="ISO-8859-1"?> <note> <to>هومن</to> <from>من</from> <heading>باگ</heading> <body>این فارسی یا عربی ساپرت نمیکنه.</body> </note> XML; $xml = simplexml_load_string($xmlstring); var_dump($xml); ?> Expected result: ---------------- object(SimpleXMLElement)[1] public 'to' => string 'هومن' (length=16) public 'from' => string 'من' (length=8) public 'heading' => string 'باگ' (length=12) public 'body' => string 'این فارسی یا عربی ساپرت نمیکنه.' (length=106) Actual result: -------------- object(SimpleXMLElement)[1] public 'to' => string 'هومن' (length=16) public 'from' => string 'من' (length=8) public 'heading' => string 'باگ' (length=12) public 'body' => string 'این فارسی یا عؠ±Ã˜Â¨Ã›ÂŒ ساپرت نمیکنه.' (length=106) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64719&edit=1

« previous php.bugs (#178646) next »