The database does not display Chinese but the front end can be displayed after the output why?

Source: Internet
Author: User
Insert Chinese display a bunch of garbled but the data output to the front end and can display the Chinese wamp How should the database garbled problem solved?


Reply to discussion (solution)

I've had this problem on phpMyAdmin before.
Because there are two kinds of phpmyadmin on the UTF8 format, another Chinese character can be displayed.
I don't know if you're the problem.

Where did you see the garbled characters?

To modify the encoding of a table:
ALTER table ' table name ' DEFAULT CHARACTER SET UTF8 COLLATE utf8_bin
To modify the encoding of a field:
ALTER table ' table name ' Change ' field name ' ' Field name ' CHAR (+) CHARACTER SET UTF8 COLLATE utf8_bin not NULL

In the database, enter the above two SQL statements to try

Where did you see the garbled characters?


The characters inside the database are garbled.

Set names Latin1;

  • Related Article

    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.