ndb.TextProperty() encoding

60 views
Skip to first unread message

Zé Gotinha

unread,
Oct 4, 2014, 4:12:13 PM10/4/14
to google-a...@googlegroups.com
Hi,

I am completely new at appEngine and I don't have experience on web development.

I am trying to create an app which the user can write a text in any language. The problem is that the site is not showing special characters as: ç, á, â, 我, στ ...
However, when I run the site locally on my computer, it shows perfectly... with any special characters that I enter...


I am using ndb.TextProperty():

class Opiniao(ndb.Model):
autor = ndb.TextProperty(  )
chave = ndb.StringProperty()
resposta = ndb.TextProperty( )
foto = ndb.BlobProperty()
data = ndb.DateTimeProperty(auto_now_add=True)
dia = ndb.DateProperty(auto_now_add=True)


I don't understand why it doesn't store utf-8 characters. 

Thanks in advance!


Vinny P

unread,
Oct 9, 2014, 2:10:20 AM10/9/14
to google-a...@googlegroups.com
On Sat, Oct 4, 2014 at 3:12 PM, Zé Gotinha <ze.goti...@gmail.com> wrote:
I am trying to create an app which the user can write a text in any language. The problem is that the site is not showing special characters as: ç, á, â, 我, στ ...
However, when I run the site locally on my computer, it shows perfectly... with any special characters that I enter...
I don't understand why it doesn't store utf-8 characters. 


Is the problem that the datastore entity isn't storing the characters, or that the text isn't showing up on the page?

Do you see any errors in App Engine logging? Can you look up the entity using the Datastore Viewer and see what's stored within? If you submit a form containing special characters, can your application display a web page containing those characters (not store, just display)?
 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Reply all
Reply to author
Forward
0 new messages