Home > Backend Development > PHP Tutorial > php dom处理title中非UTF-8导致乱码

php dom处理title中非UTF-8导致乱码

WBOY
Release: 2016-06-06 20:41:25
Original
1076 people have browsed it

php dom在处理title时,如果遇到非UTF-8会导致乱码,该怎么样解决?

目前想到的是先进行正则,把这些字符替换掉,然后再替换回来,有没有成熟的解决方案?

回复内容:

php dom在处理title时,如果遇到非UTF-8会导致乱码,该怎么样解决?

目前想到的是先进行正则,把这些字符替换掉,然后再替换回来,有没有成熟的解决方案?

PHP手册:多字节字符串

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template