On Montag, 19. Februar 2007, omat * gezgin.com wrote: > I am trying to match a utf-8 character with a filter. Within the > python prompt, "u'ç'.encode('utf-8')" returns "\xc3\xa7" correctly but > when I use this inside a filter like: > > (name__startswith = u'ç'.encode('utf-8')) > > I get a syntax error: > Non-ASCII character '\xc3' in file .../views.py on line 24, but no > encoding declared... > > I couldn't figure out which encoding declaration does the message is > talking about. > > Thanks for any advice... > oMat
Hi, you can try to add this as first line in your file: # -*- coding: utf-8 -*- Best Regards. -- Dirk Eschler <mailto:[EMAIL PROTECTED]> http://www.krusader.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---