Should I use Unicode string by default?

前端 未结 6 959
星月不相逢
星月不相逢 2021-02-07 03:38

Is it considered as a good practice to pick Unicode string over regular string when coding in Python? I mainly work on the Windows platform, where most of the string types are U

6条回答
  •  轮回少年
    2021-02-07 04:15

    As you ask this question, I suppose you are using Python 2.x.

    Python 3.0 changed quite a lot in string representation, and all text now is unicode.
    I would go for unicode in any new project - in a way compatible with the switch to Python 3.0 (see details).

提交回复
热议问题