0

I created dumpdata but when i try to load this by using command:

py manage.py loaddata backup.json

Then i have error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Then when i opened this database by Notepad then it shown me that its encoded in UCS-2 LE BOM, how I can save dumpdata in UTF-8 language?

Kuracha
  • 313
  • 6
  • 17

1 Answers1

0

Edit your backup.json using Notepad ++ (in Windows right-click the file and Notepad ++ should be an option) and under the Encoding drop down select 'Encode in UTF-8'. This will change the encoding and allow you to load your fixture.

NapSolo
  • 41
  • 4