On Tue, 2008-03-25 at 12:09 -0700, Francisco Benavides wrote: > Hi, > > I have the following code, when rendering in django, we get an error: > > constants.py > http://dpaste.com/41245/ > > Django debug data: > http://dpaste.com/41246/ > > How can the "รบ" character be correctly rendered in the templates?
Whenever you put non-ASCII characters into Python source, you have to tell Python the encoding of the file. Assuming it is in UTF-8 (normal), this means putting # coding: utf-8 at the top of the file. See PEP 263 [1] if you're interested in the details. [1] http://www.python.org/dev/peps/pep-0263/ Regards, Malcolm -- Borrow from a pessimist - they don't expect it back. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---