为什么文件生成后是乱码?该怎么处理

WBOY
Release: 2016-06-13 10:11:31
Original
1401 people have browsed it

为什么文件生成后是乱码?
写了个函数,替代相应的文字,替代完后显示的都成了???????????????????????????,??????????????,??????????????
这种乱码,是乍回事?我程序全程序编写都是用的utf-8

------解决方案--------------------
用iconv()把内容转换成utf-8,使用方法翻手册
------解决方案--------------------
你的文件是ansi编码吧. 用iconv()转化一下再写入。

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