Excel import MySQL garbled related issues! Tokyu

Source: Internet
Author: User
Excel import MySQL garbled problem! Tokyu
I import MySQL from Excel a total of more than 2000 records, is a lot of traditional Chinese character data, the PHP program is also found in some garbled. Only in the page toolbar to view the selection of Chinese Simplified database data is not garbled, but the page of Chinese characters (not read from the database) and become garbled, What utf-8,gbk,gb2312 have tried, or garbled, either the page of Chinese characters garbled or from the database isolated from the traditional Chinese characters garbled, now we have any method or write what code to open a page will not garbled, thank you!

------Solution--------------------
mysql_query ("Set names Big5 '");

Is it useless to do this?
------Solution--------------------

When you import a database
mysql_query ("Set names ' UTF8 '");
It is also advisable to convert all the read from Excel to Utf-8 and then into the database

read out the same mysql_query ("Set names ' UTF8 '");


------Solution--------------------
Excel export problems try exporting to UTF8
------Solution--------------------
What's the situation and version of your environment in addition?

The presentation file came over to help you write it ~ ~
------Solution--------------------
Concern
------Solution--------------------
I exported encountered garbled, changed the code on OK

That's not going to work, and I don't know why ........ ...........
------Solution--------------------
discuss
Now the garbled problem solved, first to convert the Excel file into the utf-8 format txt and then save as CSV format file, so the import will be UTF-8 format!
But there are new problems, is the import of each column as long as the first character is Chinese characters, insert the database will be empty, read out is also blank, in addition to the column of the first character is not the Chinese characters can read out the display, really dizzy dead, who knows what is going on, thank you!
  • 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.