I'm triying to figure out why this basic Flask view function:
@production.route('/prod/article')
def test_json():
description = u'HAMPDÅN'
article = {'id': 0, 'description': description }
print(article)
return article
Is returning this:
{
"description": "HAMPD\u00c5N",
"id": "0"
}
But reading Python console print(article) is returning this:
{'id': '0', 'description': 'HAMPDÅN'}
What am I doing wrong? Its Flask problem when handling the HTTP Response? Because as far as I know, if the print its outputting OK the "HAMPDÅN" its not a problem about encoding, at least from my code part.
So don't know whats happening here... Thanks for any help!