When we are using postman to test a web server api that is built by tornado, we may get a garbled text. For example:
In this tutorial, we will introduce you how to fix this problem.
How to fix garbled text in tornado?
We should set charset type for http response header.
For example:
self.set_header("Content-Type", "application/json;charset=UTF-8")
In this code, we will tell web server output utf-8 text.
Restart your web server, then test you api again, you will see: