On Sat, Feb 27, 2010 at 4:06 AM, jul <juj...@gmail.com> wrote: > hi, > > when submitting some characters in a charfield of a django form I get > the following error (e.g. when submitting 'ś') > > (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and > (utf8_general_ci,COERCIBLE) for operation '='") > > It seems that the character I'm submitting is not part of my database > character set. How can I handle that? Should I first check in the > clean function of the field whether all characters are included in my > database charset ? Is this not handled by django (I would expect some > error before submitting the data to the database)?
You probably need to fix this in your database, which I'm guessing is MySQL. Change all your tables and columns to UTF8 and this should disappear. Solving it on the Python side will probably drive you crazy. Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.