On 26/03/07, Gerard M <[EMAIL PROTECTED]> wrote: > > Hello dear django comunnity, Im having a bad time with my database in > MySQL the problem is that when I try to store a word with some "rare" > characters like á é í and many others, django shows this message to > me > > OperationalError at /uploading/ > (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and > (utf8_general_ci,COERCIBLE) for operation '='") > Request Method: POST > Request URL: http://localhost:8000/uploading/ > Exception Type: OperationalError > Exception Value: (1267, "Illegal mix of collations > (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for > operation '='") > Exception Location: C:\Python24\lib\site-packages\MySQLdb > \connections.py in defaulterrorhandler, line 35 > > I've tried changing the default encoding of my database from latin1 to > utf8 but didnt work, or maybe I didnt set it well, If any of you > happen to know how can I solve this problem, would you be so kind to > tell me how please? thank you a lot >
I'm not 100% sure, but changing the dafault encoding of the database will not update the collations of the tables that are already created, so your collision will still remain. The queries for table creation generated by Django don't issue encoding and collation commands, so your initial tables should be created with the default latin1_swedish encoding. Try changing them manually, or recreating them with the default UTF8 encoding that you've set now. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---