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 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
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 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
Http://hzaufarm.tk/index.php/topic,7.0.html
I believe that many of my friends will keep a close eye on character encoding, but this is a big headache when garbled code occurs. This article, based on the experience of our predecessors and the
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
PHP page encoding declaration method (header or meta ). Php header to define a php page for utf encoding or GBK encoding php page for utf encoding header (Content-type: texthtml; charsetutf-8 ); the php page is gbk encoded header (Content-type: text
The ideal situation is to unify the three codes into gbk or UTF-8, so that resolution is normal. But how can it be different? For example, -- PHP encoding is UTF-8 -- MySQL encoding is UTF-8 -- the browser encoding is gbk. in this case, you only
We can use show variables like character to view character encoding in mysql. modify the configuration method in my. ini. Let's take a look at it.
Recently, in the mysql database used by the project team, garbled data is inserted. We have summarized
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.