I used "BỘ MÔN TOÁN" string in django template it raised error "'utf8' codec can't decode byte 0xd4 in position 569: invalid continuation byte". But when I use "BO MON TOAN" string, it does'nt raise error. So, I used vietnamese in template and this is my code:
{% extends "site_base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load url from future %}
{% block body_base %}
<div class="subject-box-title">
BỘ MÔN TOÁN
</div>
{% endblock %}
And this is error in my project:
What's happening in my project. Please help me, thanks!
You can define into your HTML tag!
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
and then try to o/p the string.
To debug the issue follow following steps:
In your python files, declare the encoding # -*- coding: utf-8 -*-
In your base html <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With