Answer the question
In order to leave comments, you need to log in
How to fix an encoding error when adding data from the admin panel?
Hello, I copy the text from another site and paste it into the field in the admin panel, I get it when I add 'utf8' codec can't decode byte 0xd0 in position 0
it. I copy the same text from the sublime - everything is in order, everywhere the encoding is utf-8.
What could be the reason? Can't use 3.
Answer the question
In order to leave comments, you need to log in
Try to make unicode(str, errors='ignore') or unicode(str, errors='replace') to the string in the model presave. And check if the site has utf-8 encoding set when viewing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question