#774·bottle

Formsdict attribute like access returns invalid values for parameters submitted with unicode characters

Author: ctengizCreated Jul 13, 2015Updated Sep 7, 2024
LabelsNeeds input

Suppose we got a parameter submitted which has the value of 'ğüşiöç': aparam = 'ğüşiöç'

If request.method is 'GET':

request.GET.aparam returns : 'ğüşiöç' --> ok request.GET['aparam'] returns : 'ğüşiöç'--> ??

If request method is 'POST':

request.POST.aparam returns : '' --> ?? request.POST['aparam'] returns : 'ğüşiöç--> ok

This behaviour interrupts clean and consistent coding style. When I need to access request form parameters I need to remember correct way to access them rather than simply writing request.POST.aparam.

Is this behaaviour is intended way or is this a bug or am I missing sth?

PS: Tested with Python 3.4, Python 3.2, and latest bottle github clone code

TIA