Edit report at https://bugs.php.net/bug.php?id=64719&edit=1
ID: 64719 Updated by: johan...@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