我有一个json {u'nickname':u'\U0001f638\U0001f638\u5bb6\u52c7'}
。
将nickname
保存到数据库时,将引发:
DatabaseError: (1366, "Incorrect string value: '\\xF0\\x9F\\x98\\xB8\\xF0\\x9F..
.' for column 'nickname' at row 1")
我认为\U0001f638\U0001f638
是问题所在,它们是某种图像代码。但是如何检测并移除这些字符串?在
Tags:
我找到了答案here。 表情信息:http://punchdrunker.github.io/iOSEmoji/table_html/index.html
\U0001f638
是IOS表情符号。 使用Martijn Pieters
的代码:它起作用了!在
相关问题 更多 >
编程相关推荐