I\'m having problems dealing with unicode characters from text fetched from different web pages (on different sites). I am using BeautifulSoup.
The problem is that
We struck this error when running manage.py migrate
in Django with localized fixtures.
Our source contained the # -*- coding: utf-8 -*-
declaration, MySQL was correctly configured for utf8 and Ubuntu had the appropriate language pack and values in /etc/default/locale
.
The issue was simply that the Django container (we use docker) was missing the LANG
env var.
Setting LANG
to en_US.UTF-8
and restarting the container before re-running migrations fixed the problem.