Website Test text display garbled problem related

Source: Internet
Author: User
Website Test text Display garbled problem
The character of my database is Gb2312_chinese_bin
Fun.php the character set is gb2312
In addition to the Pure PHP code page, each page has been changed to be gb2312
The text of the page code shows no problem,
But in the pure PHP code, the output of the table text will show garbled, how to solve?

------Solution--------------------
Set the header on the PHP page ("content-type:text/html; CHARSET=GBK "); PHP file to save the choice of encoding also choose GBK it
------Solution--------------------
Yes, the program files must also be saved into GBK ... I encountered the problem is to unify everything to UTF8, but many times the code file is not stored utf8, there will be garbled problems
------Solution--------------------
Well. When fetching data. Plus mysql_query ("Set names ' GBK '");
------Solution--------------------
Explore

Reference:
Set the header on the PHP page ("content-type:text/html; CHARSET=GBK "); PHP file to save the choice of encoding also choose GBK it

Header ("content-type:text/html; CHARSET=GBK ");
..? >

Is that so??

------Solution--------------------
PHP Code
  
   
------Solution--------------------
Explore
But in the pure PHP code, the output of the table text will show garbled, how to solve?

------Solution--------------------
Explore
Set the header on the PHP page ("content-type:text/html; CHARSET=GBK "); PHP file to save the choice of encoding also choose GBK it
  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.