MichaelP
MichaelP

Reputation: 2781

How to save unicode string into datastore google appengine using java

I'm working Google App Engine using Java, i receive data from form fields and save into datastore. I receive Unicode string from HttpServletRequest like this:

URLDecoder.decode(request.getParameter("text"),"UTF-8")

It returns Unicode string correctly, then i save this string into datastore

DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Entity entity = new Entity("TextEntity");
entity.setProperty("text", URLDecoder.decode(
                req.getParameter("name"), "UTF-8"));
entity.setProperty("createdOn", new Date());
datastore.put(entity);

I saw as picture below: enter image description here enter image description here

As you can see, the text field with unreadable characters. How can I solve this problem? Please help me out.

Upvotes: 2

Views: 1026

Answers (1)

koma
koma

Reputation: 6566

It is a problem with the datastore viewer of the development server. I just ran into this exact same problem, but on the production server, the values are OK.

Upvotes: 1

Related Questions