Is there an easy way to make unicode work in python?

后端 未结 5 2266
难免孤独
难免孤独 2021-01-04 09:22

I\'m trying to deal with unicode in python 2.7.2. I know there is the .encode(\'utf-8\') thing but 1/2 the time when I add it, I get errors, and 1/2 the time wh

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 09:51

    Actually, the easiest way to make Python work with unicode is to use Python 3, where everything is unicode by default.

    Unfortunately, there are not many libraries written for P3, as well as some basic differences in coding & keyword use. That's the problem I have: the libraries I need are only available for P 2.7, and I don't know enough to convert them to P 3. :(

提交回复
热议问题