search

Home  >  Q&A  >  body text

python如何处理带有emoji表情的字符串

如何才能将从新浪微博抓取的某条含有emoji表情字符的数据添加进mysql数据库,mysql的版本是5.5.x,使用的是python语言。

天蓬老师天蓬老师2785 days ago883

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-04-17 11:46:18

    After searching on the Internet for a long time, I finally found a solution, which is not perfect. My solution is to filter out the emoji characters and not write them to the mysql database.

    reply
    0
  • 黄舟

    黄舟2017-04-17 11:46:18

    The essence of emoji is special unicode characters, as long as your database encoding supports unicode. List: http://www.unicode.org/charts/PDF/U1F300.pdf

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:46:18

    Just use utf8mb4 encoding for mysql

    reply
    0
  • Cancelreply