Warning raised by inserting 4-byte unicode to mysql

前端 未结 3 1617
旧时难觅i
旧时难觅i 2020-12-02 00:16

Look at the following:

/home/kinka/workspace/py/tutorial/tutorial/pipelines.py:33: Warning: Incorrect string 
value: \'\\xF0\\x9F\\x91\\x8A\\xF0\\x9F...\' fo         


        
3条回答
  •  被撕碎了的回忆
    2020-12-02 01:07

    I think you should use utf8mb4 collation instead of utf8 and run

    SET NAMES UTF8MB4
    

    after connection with DB (link, link, link)

提交回复
热议问题