I'm working on a Django app that gets data from a Redshift database. The people who wrote to this Redshift database made some bizarre choices. I'm trying to figure out how handle the fact that it has strings like this:
Let’s play! \xe2\x9a\xbd\xef\xb8\x8f
With psycopg2 I'm getting these into Python as
u'Let\u2019s play! \\xe2\\x9a\\xbd\\xef\\xb8\\x8f'
I'm supposed to render this as
Let’s play! ⚽️
They're stored in the Redshift table as varchar(65535)
. I'm using pyscopg2 to pull them into the app backend (Django 1.11, Python 2.7). They are being rendered with JavaScript on the front end.
Any suggestions would be appreciated -- I can't figure out any solution out at all.