Emoji symbols/emoticons in Python IDLE

余生颓废 提交于 2019-12-11 07:49:55

问题


I can't encode and display characters in the range \U0001f600-\U0001f650. They are called emoji or emoticons and they are used in all social media.

Python error message:

  File "C:\Python\Python342x64\lib\encodings\cp1251.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f62d' in position 108: character maps to <undefined>

This character must look like - 😭. I work in Python 3.4.2 (from Sublime Text 2).

How can I display emoji symbols natively in Python IDLE?

来源:https://stackoverflow.com/questions/26694524/emoji-symbols-emoticons-in-python-idle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!