As follows:
Copy codeThe Code is as follows: Warning at/admin/assets/add/
Incorrect string value: '\ xE5 \ x93 \ x88 \ xD5 \ x92 \ x88...' for column 'name' at row 1
Request Method: POST
Request URL: http: // 127.0.0.1: 8000/admin/assets/add/
Django Version: 1.2.3
Exception Type: Warning
Exception Value:
Incorrect string value: '\ xE5 \ x93 \ x88 \ xD5 \ x92 \ x88...' for column 'name' at row 1
Exception Location:/usr/lib/pymodules/python2.7.1/MySQLdb/cursors. py in _ warning_check, line 82
Python Executable:/usr/bin/python
Python Version: 2.7.1
The preliminary judgment should be the problem of mysql [the essential issue of research on behalf of]:
Add the following in my. ini:Copy codeThe Code is as follows: [client]
Character-set-client = utf8
Default-character-set = utf8
[Mysqld]
Character-set-server = utf8
Character-set-filesystem = utf8 [mysql]
Init_connect = 'set NAMES utf8'
[Mysql]
Default-character-set = utf8
Restart the mysql server to solve the problem.
View the default encoding used to create a mysql database:
Show create database db_name;
Change the encoding of the created db:
Alter database db_name character set utf8 collate utf8_general_ci;
View database information:
Mysql> status
View database information 2:
Mysql> show variables like 'Char % ';