Reputation: 6756
I have base.html file:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block head.title %}{% endblock %}</title>
</head>
<body>
{% block body.content %}{% endblock %}
</body>
</html>
and 500.html file:
{% extends "base.html" %}
{% block head.title %}
500 ł
{% endblock %}
{% block body.content %}
500 -
{% endblock %}
When I generate some error I don`t see 500 ł but
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb3 in position 54: unexpected code byte
When I change ł to l everything is fine. I creates new html files with eclipse. What is wrong?
EDIT:
I cannot use any of polish diactric characters
Upvotes: 2
Views: 1795
Reputation: 10836
It looks like your template file might not being saved in utf8 by Eclipse. According to this bug it chooses your OS's default encoding, which may not be utf8.
You can configure Eclipse like this:
Or you can use the HTML entity which is Ł
and then it doesn't matter what encoding the file is saved as.
Upvotes: 4
Reputation: 32244
ł is not a valid utf8 character, you will have to replace it with it's ascii character reference Ł
This website has a useful list of ascii codes for any special characters you want to include in your web pages.
Upvotes: 0