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

Was it helpful?

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top