I want to display the message in Cyrillic. The views.py file views.py stored in utf-8 encoding without a BOM .

 # -*- coding: utf-8 -*- from django.http import HttpResponse, Http404 """ код """ def CreateReport(request): return HttpResponse(u'Проверьте введённые данные: ошибка ввода', content_type = 'text/plain') 

It seems that everything is spelled correctly, but the result is a string:

"Проверьте введС'РЅРЅС‹ Рµ РґР ° РЅРЅС ‹Рµ: РСС € РёР ± РєР ° РІРІРѕРґР °"

How to bring it all the same Cyrillic?

    1 answer 1

    Suddenly everything worked out. The correct HttpResponse line looks like this:

     return HttpResponse(u'Проверьте введённые данные: ошибка ввода') 

    Although before this syntax deduced an error.