在XML 和JSON Schema 混淆了图八
我的阵列如下:
$array = array(
array( name => abc , text => اسلسصثصض صثصهخه عه☆anton & budi☆ ),
array( name => xyz , text => nice ),
);
when i convert it to XML it give me this result
<?xml version="1.0"?>
<response>
<item>
<name>abc</name>
<text>اسلسصثصض صثصهخه عه☆anton <&> budi☆</text>
</item>
<item>
<name>xyz</name>
<text>nice</text>
</item>
</response>
为什么结果如下:
<?xml version="1.0"?>
<response>
<item>
<name>abc</name>
<text>اسلسصثصض صثصهخه عه☆anton & budi☆</text>
</item>
<item>
<name>xyz</name>
<text>nice</text>
</item>
</response>
And When i convert it to JSON it will give me result :
[
{
"name": "abc",
"text": "u0627u0633u0644u0633u0635u062bu0635u0636 u0635u062bu0635u0647u062eu0647 u0639u0647u2606anton <&> budiu2606"
},
{
"name": "xyz",
"text": "nice"
}
]
以及为什么不喜欢:
[
{
"name": "abc",
"text": "اسلسصثصض صثصهخه عه☆anton & budi☆"
},
{
"name": "xyz",
"text": "nice"
}
]
is that any way to use utf-8 character inside xml or json ? or that s are the standard ?