0
I’m having trouble using the charset='UTF-8'
. I am developing a website for a college project using MVC and as a standard I declared the utf-8
in a view to be used as a standard for other views, but in most pages Unicode works, and in others not, and I use the same standard for all views. Does anyone know any way to fix this or why it was wrong?
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<base href="/<?php echo $baseUrl ?>" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
<?=$title?>
</title>
</head>
<body>
<section>
<?php $this->controller->renderView();?>
</section>
</body>
What is your problem?
– Sam
In some views it’s as if I’m not declared utf-8
– Vinnicius Gomes
post your view code that doesn’t work please see before if you actually declared the <meta charset='UTF-8 tag' .... >
– Victor
@Good afternoon, I don’t use includes
– Vinnicius Gomes
@Victor posted the base code I use on the site
– Vinnicius Gomes
See if you can put this in the web.config file:
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-br" />
– Sam