Solve the problem of garbled characters when php Imports Excel. csv format data.

Source: Internet
Author: User
The following editor will give you a perfect example of the garbled problem when php guides the Excel. csv format data. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at the following small series to bring you a perfect solution for php guide excel. csv format data garbled. I think this is quite good. now I will share it with you and give you a reference. Let's take a look at it with Xiaobian.

1. header ('content-Encoding: XXXX ');


There may be encoding problems:You can try UTF-8, GBK, GB2312, and other encoding formats

2, there may be file encoding problems, although the UTF-8 does not recommend with BOM, but export excle is Microsoft products, so the file format to change, UTF-8 BOM format.

The above perfectly solves the problem of garbled characters in the. csv format of php export excle's. it is all the content that I have shared with you. I hope to give you a reference and support for PHP.

For more information about how to solve the problem of garbled characters when importing excel. CSV data in php, please follow the PHP Chinese website!

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.