Question

My Django tests are failing with this error.

DatabaseError: character 0xcb88 of encoding "UTF8" has no equivalent in "LATIN1"

It's because the encoding on the database needs to be UTF8. However this is the test database created automatically by Django.

How can I tell it to create it with the correct encoding?

Thanks

Était-ce utile?

La solution

You can define charset for test database in your settings.py file: https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-TEST_CHARSET

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top