Unicode vs UTF-8 confusion in Python / Django?

前端 未结 5 1974
渐次进展
渐次进展 2020-12-14 00:53

I stumbled over this passage in the Django tutorial:

Django models have a default str() method that calls unicode()

5条回答
  •  眼角桃花
    2020-12-14 01:10

    Python stores Unicode as UTF-16. str() will return the UTF-8 representation of the UTF-16 string.

提交回复
热议问题