Bingo, that was precisely the problem: altering the message field to use utf8_general_ci solved it. Thanks, i was really pulling my hair out over this one!
Sean On Feb 20, 5:18 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Fri, Feb 20, 2009 at 8:00 PM, SeanB <sean.boi...@gmail.com> wrote: > > > I have an application that include Unicode strings (Greek and Hebrew), > > running on a dev machine and an (inside the firewall) release machine > > configured (to the best of my ability) with the same Python, Django, > > MySql and connector. > > > When editing an object containing one of these strings on the release > > machine, in the admin interface, when i save i get: > > OperationalError at /admin/realia/lemmarelation/1597/ > > > (1366, "Incorrect string value: '\\xE1\\xBC\\x80\\xCE\\xAE\\xCF...' > > for column 'message' at row 1") > > > Request Method: POST > > Request URL: http://debuild/admin/realia/lemmarelation/1597/ > > Exception Type: OperationalError > > Exception Value: > > > (1366, "Incorrect string value: '\\xE1\\xBC\\x80\\xCE\\xAE\\xCF...' > > for column 'message' at row 1") > > > [snip] > > > 'message' isn't in my model, so it's breaking somewhere in the Django > > part, but i'm not sure why, or how to fix it. And i can't find > > anything different about my two environments that explains why it > > breaks on one machine, but works fine on the other. What seems like > > the likely culprit is a UTF-8 string, whose collating method is > > utf8_general_ci. It's not a single data value: attempting to edit any > > object in this table seems to raise this error. > > Check the auth_message table definition (output of create table in mysql) on > the machine that works vs. the one that fails. It sounds like on the > failing machine this table may have a default latin1 charset instead of > utf8, so whenever the Django admin code attempts to insert a message (e.g. > "XYZ was changed, you may edit it again below") that refers to an object > where "XYZ" is going to contain chars not representable in latin1, you get > an error. > > Karen --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---