Php Chinese character encoding and conversion methods
This article introduces some Chinese character encoding conversion knowledge in php and analyzes the principles and methods of php encoding conversion. For more information, see.This
PHP character set encoding garbled solution. Either the original Chinese characters on the page and the Chinese characters retrieved from the database are garbled; or the original Chinese characters and database Chinese characters are displayed
Two methods are used to set the encoding when php loads the page. php loads the page encoding. Two methods are used to set the encoding when php loads the page. php loads the page encoding. php loads the page encoding. one is the output meta tag: 1.
Php page, mysql database to UTF-8 garbled, UTF-8 encoding problem summary, mysqlutf-8
Example 1:
PHP page to UTF-8 Encoding Problems
1. Add a line at the beginning of the Code: header ("Content-Type: text/html; charset = UTF-8 ");
2. PHP file
If a website needs to be internationalized, it needs to convert the code from GB2312 to a UTF-8, there are many problems to note, if not completely converted, there will be a lot of coding problems! Next, I will share with you the php page through
PHP unified page code to avoid garbled code, php page code garbled. PHP unified page encoding to avoid garbled code. php page encoding and page encoding must be consistent with MySQL database encoding, html page encoding, and PHP or html file
Apache encoding is a solution that causes website garbled characters due to a default apache encoding error. About the solution to Apache default encoding errors that cause website garbled characters, apache encoding has recently encountered such
Document directory
Unicode Character Set Overview
Encoding System Changes
Common unicode encoding
Unicode-Related Frequently Asked Questions
Original article: http://www.cnblogs.com/KevinYang/archive/2010/06/18/1760597.html
Character
I. HTML page to UTF-8 encoding problem1. After head, add a line before title:The order must not be wrong, must be inThe caption displayed may be garbled!2.html file Encoding problem:Click on the Editor's menu: "File", "Save As", you can see the
Php page encoding settings. The php header () function is used to define the encoding of a php page (note: No output is available before, or an error is reported). The php page is UTF-8 encoded: header (Content-type: texthtml; the header () function
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.