Flachen
Flachen

Reputation: 1

Danish characters in Appengine, wrong formatting in Datastore

I have a problem with regards to saving text strings in the DataStore, the problem is special characters instead of the danish character "å" it saves "=E5", "ø" for "=F8" and so on. The thing that i don't understand is the fact that on my local development server it saves the strings correctly.

Any ideas to what i can do?

Upvotes: 0

Views: 98

Answers (3)

Devashish Mamgain
Devashish Mamgain

Reputation: 2097

Add
in appengine-web.xml

String str = "some special characters string"; use the following to persist and retrieve from the datastore new String(str.getBytes("UTF8"), "UTF8")

Upvotes: 0

Greg
Greg

Reputation: 10360

Is the form also uploading a file? http://code.google.com/p/googleappengine/issues/detail?id=2749 The work-around in comment 21 on the report has fixed it for me, I'm yet to try the newer version of webob suggested in the most recent comments.

Upvotes: 0

onon15
onon15

Reputation: 3630

It could be incorrect character encoding in submittal of the form (i.e. between the browser and the webapp, rather than between the webapp and the datastore). Try to see if the form is correctly encoded when sent (check the request headers, to see if the content-encoding header says UTF-8 or otherwise).

Upvotes: 1

Related Questions