I have a simple flask application with one endpoint
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'GET':
return render_template('form.html')
return request.form['a']
the form.html
looks like this:
<!DOCTYPE html>
<form method="POST">
<input type="text" name="a" value="öäü"><br>
<input type="submit" value="submit">
</form>
when I open the form in firefox i can enter values like äöü
send the POST-request end receive the correct response äöü
.
However, when I simply try to send the POST-request using curl like this:
curl http://localhost -F "a=öäü"
I get the cryptic response:
´┐¢´┐¢´┐¢
I also tried the solution from How do I POST form data with UTF-8 encoding by using curl?
curl -v -X POST -H "Content-Type: application/x-www-form-urlencoded; charset=utf-8" --data-ascii "a=äöü" http://localhost
but i still get the same result. I am using curl on a Windows 7 with codepage 850
Any help how to even debug this behavior is deeply appreciated