奇怪的等号“=”插入到

发布于 2024-10-22 20:31:03 字数 1193 浏览 3 评论 0原文

只能在 Google App Engine 服务器上重现此问题,而不能在我的开发服务器上重现。 仅当我将网页的一部分复制粘贴到

我搜索了Google App Engine论坛并找到了两个相关帖子,但仍然没有弄清楚。有人可以给我更多提示吗?谢谢!

这是我的代码:

HTML

< form method = "post" action = "{% if action %}{{ action }}{% endif %}" enctype = "multipart/form-data" accept - charset = "UTF-8" >
< textarea name = "textbox" id = "textbox" rows = "3" cols = "50" wrap = "soft" >

Python

t1 = self.request.get("textbox")
t2 = self.request.POST["textbox"]
logging.info("request get: %s, %s" % (t1, t2))

相关帖子: http://code .google.com/appengine/forum/python-forum.html?place=topic%2Fgoogle-appengine-python%2FOYfn9tXncUk%2Fdiscussion

http://code.google.com/appengine/forum/python-forum.html?place=topic %2Fgoogle-appengine-python%2FCsSrUmb7N4E%2F讨论

Can only reproduce this issue on Google App Engine Server, not on my development server.
Only when I copy-paste a part of web page to the <textarea>.

I searched Google App Engine forum and found two related posts, but still didn't figure it out. Can somebody give me more hint? Thanks!

Here is my code:

HTML

< form method = "post" action = "{% if action %}{{ action }}{% endif %}" enctype = "multipart/form-data" accept - charset = "UTF-8" >
< textarea name = "textbox" id = "textbox" rows = "3" cols = "50" wrap = "soft" >

Python

t1 = self.request.get("textbox")
t2 = self.request.POST["textbox"]
logging.info("request get: %s, %s" % (t1, t2))

Related Posts:
http://code.google.com/appengine/forum/python-forum.html?place=topic%2Fgoogle-appengine-python%2FOYfn9tXncUk%2Fdiscussion

http://code.google.com/appengine/forum/python-forum.html?place=topic%2Fgoogle-appengine-python%2FCsSrUmb7N4E%2Fdiscussion

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抠脚大汉 2024-10-29 20:31:03

感谢用户 Djidjadji 在 Google App Engine 论坛上的提示,我发现 quopri.decodestring() 可以帮助我!这是我使用的代码。希望它可以节省其他沮丧的程序员的时间:)

tMessage = self.request.get("tMessage")

tMessage = quopri.decodestring(tMessage)

tMessage = " ".join(tMessage.split()) #Remove all whitespace

logging.info("tMessage: %s" % tMessage)

Thanks to a hint on Google App Engine Forums from user Djidjadji I found that quopri.decodestring() helps me out! Here is the code I used. Hope it can save other dispirited programmers' time :)

tMessage = self.request.get("tMessage")

tMessage = quopri.decodestring(tMessage)

tMessage = " ".join(tMessage.split()) #Remove all whitespace

logging.info("tMessage: %s" % tMessage)
梦里南柯 2024-10-29 20:31:03

这是 Google App Engine 过时的 WebOb 库中的错误

只需在您的 app.yaml 文件中添加此较新版本的 WebOb 即可。

libraries:
- name: webob
  version: "1.2.3"

乔什·卡斯韦尔 (Josh Caswell) 提议的“quopri”修复方案仅为租金的一半。它不适用于非 ASCII 字符。

This is a bug in the outdated WebOb library of Google App Engine.

Just add add this newer version of WebOb in your app.yaml file.

libraries:
- name: webob
  version: "1.2.3"

The proposed quopri fix by Josh Caswell is only half the rent. It doesn't work with non-ascii characted.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文