A
A
Alexey2014-10-10 07:40:51
Python
Alexey, 2014-10-10 07:40:51

Bootle Python Web Framework sending post request with Russian letters from the form ?

Tell me, I'm passing data (Russian letters) from the post form to the script, the encoding of the file with the utf-8 form.
piece of code:

.......................
@post('/new')
def addtask():
   who = request.forms.get('who')
   print(who)
   return str(who)

It must be - Smirnova, and the print outputs to the console -
СмиÑнова
and return str(who) is the same.
How to be, where to dig, what manuals to smoke?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dimkauzov, 2014-10-10
@ZeLib0ba

Faced the same problem, solved with getunicode
who = request.forms.getunicode('who')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question