On Jul 21, 3:46 pm, Rodrigo Gomes <rgo...@gmail.com> wrote: > Hi Daniel, > > My databse enconding (Mysql) is utf-8, as you can see below: > > Server characterset: latin1 > Db characterset: utf8 > Client characterset: latin1 > Conn. characterset: latin1
But what about your actual tables? When you do 'SHOW CREATE TABLE mytablename;', what does it show for the DEFAULT CHARSET value at the end? > There is something strange, because I'm showing the same information on my > page and I'm not getting that error that I showed before. > > The difference is that in my page I put <meta http-equiv="content-type" > content="text/html; charset=utf-8" /> (without this I get the error) > > My model code It's just mapping the database fields to python code, just > like this: > (the class and variable names are in Portuguese) > > Is it missing something? > > *from django.db import models > > class PresenteRecebido(models.Model): > nome_convidado = models.CharField(max_length=60) > data_recebimento = models.DateField() > email = models.EmailField() > descricao_presente = models.CharField(max_length=300) > ip = models.CharField(max_length=100) > > def __str__(self): > return self.nome_convidado + " - " + self.descricao_presente* Probably not the cause of the problem but you shouldn't be using __str__, you should be using __unicode__. And you should make sure it actually returns unicode: def __unicode__(self): return u'%s - %s' % (self.nome_convidado, self.descricao_presente) -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---