You have to convert between escaped and un esacaped.  You don't have a
"Unicode String" you have an escaped string with Unicode encoded escapes.

"smart quotes" are Unicode characters, so if you want to store them as
Unicode you store them as the quotes un-escaped.



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andreas
Sent: Wednesday, January 11, 2012 4:04 PM
To: [email protected]
Subject: [google-appengine] string encoding problem

hi,

lets say i have a unicode string like this:

u'\u201cThey\u2019re paying for it.'

if i print it in the python console i get :
"They're paying for it.

how i can save it to the datastore correctly?

i have data i need to import into the app and all the strings are like the
one above.
right now all my attempts ended in an output that is like the string above
rather than the print.

--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to