我需要将(在Python中)一个4字节的字符转换成其他字符。这是为了将它插入到我的utf-8mysql数据库中而不会出现错误,例如:“不正确的字符串值:'\xF0\x9F\x94\x8E'forcolumn'line'atrow1”Warningraisedbyinserting4-byteunicodetomysql显示这样做:>>>importre>>>highpoints=re.compile(u'[\U00010000-\U0010ffff]')>>>example=u'Someexampletextwithasleepyface:\U0001f62a'>>>highpoint