bottle icon indicating copy to clipboard operation
bottle copied to clipboard

the autojson can't correctly handle chinese

Open xm0625 opened this issue 8 years ago • 14 comments

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.

xm0625 avatar Sep 01 '16 03:09 xm0625