the autojson can't correctly handle chinese
Author: xm0625Created Sep 1, 2016Updated Sep 7, 2024
LabelsFeature
whatever the response.charset or the charset of response.content_type I set, the chinese characters are always converted to unicode characters. so I can only turn of the autojson, and output the json string by myself. json.dumps(<dict_to_convert>, ensure_ascii=True) performs like the autojson(unicode) json.dumps(<dict_to_convert>, ensure_ascii=False) is what i want.(bytestring) maybe bottle needs to provide a choose.
Source: bottlepy/bottle