何らかの理由で、私はGAEのキリル文字の入力が奇妙になりました。フォームからの入力、GAE、間違った
ローカル環境ではすべて正常に動作し、入力フィールドにはself.request.get('')
という文字列があります。 しかし、Appspotでは、ロシア語の代わりに「1mxt1czq0snfzq ==」や「0ylqtdgb0yi =」と表示されます。私がこだわっているの.html
meta charset="utf-8"
input type="text" name="title" id="title"
での.py
!/usr/bin/env python
-*- coding: utf-8 -*-
title = self.request.get('title')
で
。
編集: はい、これはBase64です。しかし、なぜGAEはそれを使用していますか?それをどこで変更するのですか?なぜローカルとAppspotで異なる動作ですか? BlobHandler
へ 私は、ファイルを取得しようとしている同じ形式で
<form class="form-horizontal" action="{{ upload_url }}" method="POST" enctype="multipart/form-data">
<div class="control-group">
<label class="control-label" for="title">Title</label>
<div class="controls">
<input type="text" name="title" id="title">
</div>
</div>
<div class="control-group">
<label class="control-label" for="file">Load image</label>
<div class="controls">
<input type="file" name="file" id="file" accept='image/*' required="required">
</div>
</div>
EDIT2: はい。 https://code.google.com/p/googleappengine/issues/detail?id=2749
BlobHandlerのGAEにバグがあります。
解決策:accept-charset = "utf-8"フォームで、後でそれを試してください。
を追加... – aviraldg