时间:2021-07-01 10:21:17 帮助过:7人阅读
$code = preg_replace("#\\\u([0-9a-f]+)#ie", "iconv('UCS-2', 'UTF-8', pack('H4', '\\1'))", $code);
print $code;
header('Content-type: text/html;charset=utf-8');汛期尾声的到来,我省开始进入水利建设的黄金时期。记者月日获悉,今年,我省将完成水利投资达亿元,重点涵盖个方面共个项目。
$code =<<< TXT
\u6c5b\u671f\u5c3e\u58f0\u7684\u5230\u6765\uff0c\u6211\u7701\u5f00\u59cb\u8fdb\u5165\u6c34\u5229\u5efa\u8bbe\u7684\u9ec4\u91d1\u65f6\u671f\u3002\u8bb0\u80058\u670826\u65e5\u83b7\u6089\uff0c\u4eca\u5e74\uff0c\u6211\u7701\u5c06\u5b8c\u6210\u6c34\u5229\u6295\u8d44\u8fbe154\u4ebf\u5143\uff0c\u91cd\u70b9\u6db5\u76d616\u4e2a\u65b9\u9762\u51713286\u4e2a\u9879\u76ee\u3002\n\n
TXT;
echo preg_replace("#\\\u([0-9a-f]+)#ie", "iconv('UCS-2', 'UTF-8', pack('H4', '\\1'))", $code);
echo preg_replace("#\\\u([0-9a-f]{4})#ie", "iconv('UCS-2', 'UTF-8', pack('H4', '\\1'))", $code);