I created a form contains unicode like this:
# -*- coding: utf-8 -*-
from django.db import models
from django.forms import ModelForm
class Member(models.Model):
family_name = models.CharField(u"姓",max_length=200)
given_name = models.CharField(max_length=200)
gender=models.IntegerField()
I used '# -- coding: utf-8 --' prefix u"姓"
but it still raise this exception: SyntaxError: (unicode error) 'utf8' codec can't decode byte 0xd0 in position 0: invalid continuation byte
this bothered me for several days , I'll really appreciate for any help I can get.