简体   繁体   English

PHP XML编码

[英]PHP XML encoding

I need a function that will convert € or chr(0x20AC) or chr(8364) to € 我需要一个将€或chr(0x20AC)或chr(8364)转换为€的函数€ without having a static map. 没有静态地图。

I tried using htmlentities() , but it only seems to work for the symbol itself and it converts to € 我尝试使用htmlentities() ,但它似乎仅对符号本身有效,并且转换为€ .

ircmaxwell kind of answered the question in a round about way... what i was trying to do really isn't possible. ircmaxwell在某种程度上回答了问题……我试图做的事情实际上是不可能的。 I have circumvented the process by requiring the user to utilize the html entity instead. 我通过要求用户改为使用html实体来规避了此过程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM