import re
highpoints = re.compile('[\U00010000-\U0010ffff]')
example = 'Some example text with a sleepy face: \U0001f62a'
highpoints.sub('', example)
Warning raised by inserting 4-byte unicode to mysql