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++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -