I am using pymysql to make the following insert into my test table. First I set up the connection and specify the charset and set unicode to True:
conn=pymysql.connect(host=*ip*,user='simao_simao',password=*mypass*,database=*mydatabase*,use_unicode=True, charset="utf8")
Then I successfully insert the values into my table.
cur = conn.cursor()
sql = "Insert into test (colx, coly) Values('%s', 'not_relevant')"%(tag)
>>> sql
"Insert into test (colx, coly) Values('£26,302 - £35,225 + 20% R','not_relevant')"
>>> cur.execute(sql)
1
My html code includes:
meta charset="UTF-8"
Still I get the � symbol instead of the £ in my webpage. Any idea what can be wrong?