model 中有 city = models.CharField(max_length=50)
在 views 中输出的内容是 \u5e7f\u5dde
,如何将此直接输出为广州
?
ringa_lee2017-04-18 10:29:11
There are three types of encoding, one is input encoding, one is code file encoding, and one is console encoding. Is my understanding wrong? The encoding should be consistent. The default string of Python2 is unicode
, you can try __future__ unicode_literals