Hi all, I have a project which I currently migrate to the svn-trunk with unicode support.
I have the following simple Model: class MyModel(models.Model): name = models.CharField(maxlenght=60) def __unicode__(self): return self.name # no def __str__ ! In a view I want to translate messages like this: 1.1 msg = ugettext('My %(obj)s translated') % object or 1.2 msg = ugettext('My %(obj)s translated') % smart_unicode(object) 2 request.user.message_set.create(message=msg) where object is an instance of MyModel. The name of the object contains german umlaut characters. I always get an MySQL Warning/Error that the row is truncated (at the german umlaut) If I go thru this code: msg = ugettext('My %(obj)s translated') % force_unicode(object.__unicode__()) everything works fine. I debug the __unicode__() function of MyModel and display'd the type(self.name) which is type'str' and not type'unicode'. Can anybody help ? Regards, Dirk -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---