> I use Django to develop my GAE application. > The problem is I can't put my unicode data to datastore. Here is a bit > of my view.py: > > # -*- coding: utf8 -*- > from myproject.myapp.models import * > c = Clients() > c.Name = "Иванов" #Here is some text in Russian > c. put() > > This code calls an exception: 'ascii' codec can't decode byte 0xd0 in > position 0: ordinal not in range(128) > Why is it so?
You should prepend all Unicode literals with 'u', for example: c.Name = u'Превед!' -- www.muspy.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---