Hello all,

My datastore model has an attribute of class string. According to the 
documentation, the String class should be of type str or unicode.

The data I'm trying to save is unicode (I confirmed this by printing out 
the type and the original page was encoded in utf-8).

My data is successfully saved to the datastore but it still raises the 
following exception 'ascii' codec can't encode character u'\u2019' in 
position 6: ordinal not in range(128)

I'm curious as to why an exception is being raised even though the data is 
unicode and why even with the exception, the data is still saved 
successfully.

Apart from specifically trapping this error using something like {exception 
UnicodeEncodeError: pass}, is there a way to prevent this error?

 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to