On Sun, Nov 16, 2008 at 10:18 AM, jamesM <[EMAIL PROTECTED]>wrote: > > there is a value 'Qué Onda Guero' in a mysql database. When i SELECT > this row from mysql, it's displayed correctly. When i connect to mysql > DB through python 2.6 shell using mySQLObject and assign the value to > a list, the >>list_name[0] gives 'Qu\xc3\xa9 Onda Guero', and > >>variable =list_name[0] , >>print variable gives 'Qué Onda Guero' as > expected. Problems start when i try to access the same data from > django. Admin web interface represents the data as 'QuÃ(c) Onda Guero' > and django shell on the attempt to represent this object as a string > raises http://dpaste.com/hold/91142/ error. Any ideas how to make > unicode characters to appear correctly in django ecosystem? Model has > def __unicode__(self): function set, which works great except when > encounters non-ascii character. According to docs, __unicode__(self), > with help from above, should help avoiding such errors. In my case, i > guess, the help from above is not influential enough :( Thanks in > advance for any ideas or guidance. > > Please tell us:
1 - What is the output from 'show create table' in a mysql command prompt for the table containing this data. 2 - Exactly what does your model's __unicode__ method look like? 3 - When you say "When i SELECT this row from mysql, it's displayed correctly" what do you mean exactly? If you mean when you SELECT in a mysql shell, what OS is the shell running on? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---