python - django 中的 views 输出编码问题
阿神
阿神 2017-04-18 10:27:11
0
2
484

model 中有
city = models.CharField(max_length=50)
在 views 中输出的内容是 \u5e7f\u5dde ,如何将此直接输出为广州

阿神
阿神

闭关修行中......

reply all(2)
巴扎黑

Use python 3, once and for all!

左手右手慢动作

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template