English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Perfectly Solve the Problem of Garbled Characters When Exporting .csv Format Data from php

1header('Content-Encoding: XXXX');

It may be an encoding issue:You can try UTF-8, GBK, GB2312, etc. encoding formats

2It may be a file encoding issue, although UTF-8It is not recommended to include BOM, but since the exported Excel is a Microsoft product, the file format needs to be changed to UTF-8There is a BOM format.

The above article, which perfectly solves the problem of乱码 when exporting.csv format data from php, is all the content shared by the editor. Hope it can provide a reference for everyone, and also hope everyone will support and cheer for the tutorial.

You May Also Like