At the same time, when the page is saved, the encoding is converted to UTF8 format.
After the above work, using the MySQL database client tools navicat to view the database, you will find the database stored in Chinese data will be garbled, and therefore need further processing:
1, the database is built using UTF8 code to build the library, while the table or Guide table should pay attention to the use of UTF8 code.
2, the use of NAVICAT connection to the database in the advanced settings in the selection encoding encoding for UTF8, while eliminating using MySQL character set default options, and then connect.
The above settings will display normal Chinese in the database. The page will also be displayed in Chinese, but you will find that there are still some small problems with the display of time. Therefore, the conversion format (original_date.strftime ("%y/%m/%d")) is required for the output time.