Google应用程式引擎资料储存库字串编码问题 [英] Google app engine datastore string encoding problem

查看:102
本文介绍了Google应用程式引擎资料储存库字串编码问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello
我正在使用Google App Engine进行项目,我需要存储一些字符串。我正在使用Java和 JDOHelper.getPersistenceManagerFactory(transactions-optional)



一切工作正常,字符串正确保存。但是当我将它上传到谷歌应用程序引擎,所有的字符串我保存将有他们的unicode字符替换为问号(?)。如果我在项目页面上的DataViewer,我可以看到字符串实际上保存有问号。



像我说的,当在我的电脑上运行它工作正常。有没有人知道我应该做什么?

解决方案

这听起来你没有指定HTTP POST内容的编码。有关详情,请查看此问题。 / p>

Hello I'm using Google App Engine for a project I'm doing and I need to store some Strings. I'm using Java and JDOHelper.getPersistenceManagerFactory("transactions-optional")

While debugging it on my computer everything works fine and the Strings are saved correctly. But when i upload it to google app engine, all the Strings i save will have their unicode characters replaced by question marks (?). If I go to the DataViewer on the project page, I can see that the Strings are actually saved with question marks.

Like I said, when running it on my computer it works fine. Is there anyone who knows what I should do?

解决方案

It sounds like you were not specifying the encoding for your HTTP POST content. Have a look at this question for details.

这篇关于Google应用程式引擎资料储存库字串编码问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆