【发布时间】:2011-06-14 20:01:18
【问题描述】:
为什么XML在某些特殊字符上显示错误,而有些则正常?
例如,下面会产生错误,
<?xml version="1.0" standalone="yes"?>
<Customers>
<Customer>
<Name>Löic</Name>
</Customer>
</Customers>
不过没关系,
<?xml version="1.0" standalone="yes"?>
<Customers>
<Customer>
<Name>&</Name>
</Customer>
</Customers>
我通过php转换特殊字符-顺便htmlentities('Löic',ENT_QUOTES)。
我怎样才能解决这个问题?
谢谢。
编辑:
我发现如果我使用数字字符,例如L&#243;ic,它可以正常工作
现在我得想办法用php把特殊字符转成数字了!
【问题讨论】:
标签: php xml special-characters html-entities