Why is the file garbled after it is generated? What should I do?
Source: Internet
Author: User
Why is the file garbled after it is generated? A function is written to replace the corresponding text, after the replacement is complete, all displayed are ???????????????????????????,????? ?????????,?????????????? What is this garbled code? I use UTF-8 to write all programs. why is the garbled code generated by iconv?
A function is written to replace the corresponding text, after the replacement is complete, all displayed are ???????????????????????????,????? ?????????,??????????????
What is this garbled code? I use UTF-8 for programming.
------ Solution --------------------
Convert the content to UTF-8 using iconv ().
------ Solution --------------------
Your file is ansi encoded. use iconv () to convert it and then write it.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service