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

Reply via email to