以下错误的原因是什么?当我尝试过滤时:
if MyObject.objects.filter(location = aDictionary['address']):
其中位置定义为:
location = models.CharField(max_length=100, blank=True, default='')
当 aDictionary['address'] 包含带有非字母数字字符的字符串(例如 Kīhei)时,我收到以下错误:
File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in defaul
terrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1267, "Illegal mix of collations (latin1_sw
edish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")