mysql - python saving to db error: 'ascii' codec can't decode byte -


i'm having problem when writing part of xml code database

unicodedecodeerror: 'ascii' codec can't decode byte 0xe4 in position 1679: ordinal not in range(128)

how can fixed?

you want encode unicode string 'utf8' before writing db.

data.encode('utf8') 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -