Home  >  Article  >  Backend Development  >  How to convert Chinese encoding in php

How to convert Chinese encoding in php

藏色散人
藏色散人Original
2020-07-29 09:40:593171browse

How to convert Chinese encoding in php: first open the corresponding script file; then add the content as "mb_convert_encoding($name, 'UTF-8', 'ASCII,GBK,GB2312');"; finally save the changes That’s it.

How to convert Chinese encoding in php

Recommended: "PHP Tutorial"

PHP Chinese String Encoding Conversion

Scenario: Garbled characters when PHP imports data from csv

$name = mb_convert_encoding($name, 'UTF-8', 'ASCII,GBK,GB2312');

The above is the detailed content of How to convert Chinese encoding in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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