Home > Backend Development > PHP Problem > How to convert Chinese encoding in php

How to convert Chinese encoding in php

藏色散人
Release: 2023-03-03 12:54:01
Original
3387 people have browsed it

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');
Copy after login

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!

Related labels:
php
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