When I connect directly to mysql using the mysql client program, I see that my table contains utf-8 data. Here are the environment settings:
mysql> SHOW VARIABLES LIKE '%character%'; +-------------------------- +-------------------------------------------------+ | Variable_name | Value | +-------------------------- +-------------------------------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /rdsdbbin/mysql-5.1.45.R1/share/mysql/ charsets/ | +-------------------------- +-------------------------------------------------+ 8 rows in set (0.00 sec) However, when I access my model through the django shell, I have problems: In [4]: video = models.Video.objects.get(video_id='i265mCSdlsEl') In [5]: video.title Out[5]: '\xd1\x80\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9 \xd1\x8f\xd0\xb7\xd1\x8b\xd0\xba' In [6]: video.title == u'русский язык' manage.py:1: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal # Universal Subtitles, universalsubtitles.org Out[6]: False In [7]: str = u'русский язык' In [8]: str Out[8]: u'\xd1\x80\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xb8\xd0\xb9 \xd1\x8f\xd0\xb7\xd1\x8b\xd0\xba' I'm hoping that there is some obvious solution to this, since we're at our wits' end. Any suggestions would be of great use. Thank you, Adam -- 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.