Developers who do not sit under windows all the time, but sometimes there appear on the operating system often presents surprises. Faced with one of them, I hasten to share, because the method of treatment is extremely unclear. Understanding that neither Django nor your code can be blamed can take more than one hour ...
So, there is a pristine clean (from the point of python'a) Windows on which he never stood. We put. Next we install setuptools, install pip, distribute, virtualenv ... In general, we create a minimal working environment. We pull our project from the repository, syncdb, right ... We start - OK. And then, at the stage of content delivery, we get UnicodeDecodeError in the most unexpected place. And at the same time, you are not just sure, but you can see with your own eyes how your project is quietly working under Nix and on a neighboring Windows ...
Treatment method:
- open regedit
- find there HKEY_CLASSES_ROOT \ MIME \ Database \ Content Type
- Inspect Cyrillic MIME type names
- rename or nail down these names
- close regedit
EVERYTHING!
PS: While I was writing all this, I thought that Django was to blame after all. Maybe someone who is fluent in the language, will issue a bugrequest?