Reputation: 277
I read a symfony2 tutorial, but when I run my project I have a problem with é, à, è .... I added the tag that allow to use UTF-8 but same problem : here is my page index.html.twig :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<h1>Liste des catégories</h1>
{% for cat in categories %}
<p>{{ cat.nom }}</p>
{% else %}
<p>Aucune catégorie n'a été trouvée.</p>
{% endfor %}
</body>
</html>
How can I achieve this, thank you in advance
Upvotes: 0
Views: 293
Reputation: 36224
To work with UTF-8 in PHP:
<meta>
is generally not enough for this, you'll need to send the appropriate Content-Type
http-header.<!DOCTYPE html>
Upvotes: 1
Reputation: 99523
Your sourcefile is probably not actually saved as UTF-8. Check your editor settings.
Upvotes: 1