You'd want to write that as w = u'ataché'
to make sure python knew you were pushing out a unicode string, but an ASCII string. -joe On 5/8/07, Gerard M <[EMAIL PROTECTED]> wrote: > > Thanks for your help Rafael, but I got into another trouble trying to > encode my string like this; > I have the unicode string in a variable lets say w = ataché, how can I > tell python/django that the string "w" is a unicode string and how can > I make the encoding, because If I type > w.encode('utf-8'), in my views file I get this error: > > "UnicodeDecodeError: 'ascii' codec can't decode byte at position...." > > thanks for your help. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---