As I mentioned in the comments on this question, I solved the problem by adding this tag to my web.config file:
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-br"/>
Stayed like this:
There’s another thing I found that can also affect character recognition, which is the file format.
I had problems with character recognition again after the implementation of this tag on the project’s web.config.
This time it was only on a few pages where the word "Descrição"
appeared as "Descri??o"
.
I tried some modifications, like putting Encode in the tag with "iso-8859-1". This only worsened the situation as Bootstrap is not compatible and the previous problem had returned.
So I decided to see the format of the files cshtml And I found that in these pages that were giving this problem the Ncode was as ANSI. If you open the file with the note pad, for example, and ask "Save As", the window to choose the file and destination location shows the current file encounter. So all I did was change to utf-8 and save. And then these pages returned to display the characters correctly.
How did I change the pattern of these files to ANSI? I don’t know!
But anyway, problem solved again.
This is a character encoding problem. What encoding are you using on the page or website?
– Paulo Morgado
On the page I’m putting lang en-br, charset utf-8.
– user3628
I decided to add the tag on the web.config:
<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-br"/>
, within the section<system.web>
. Grateful!– user3628
Use this encoding: "iso-8859-1" which is English
– Ronan Matos