I am having trouble trying to print the result of a unicode here's what i have tried
data = u"\ud835\udc6a\ud835\udc89\ud835\udc90\ud835\udc84\ud835\udc8c"
result = data.encode('utf-8', 'surrogatepass')
#b'\xed\xa0\xb5\xed\xb1\xaa\xed\xa0\xb5\xed\xb2\x89\xed\xa0\xb5\xed\xb2\x90\xed\xa0\xb5\xed\xb2\x84\xed\xa0\xb5\xed\xb2\x8c'
result.decode('utf-8')
#UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte
According to Charbase, \udc90 is an invalid character
https://charbase.com/dc90-unicode-invalid-character
I get to convert the unicode through this website: https://www.online-toolz.com/tools/text-unicode-entities-convertor.php under the section "Decode/Unescape Unicode Entities"
Here's a screenshot of the result
How can i print this unicode out ? I am receiving data from an API and wants to store it in MySQL database. Currently, the result in MySQL database is ???????????
