As I mentioned in the comments of 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"/>
It looks like this:
There'sanotherthingI'vediscoveredthatmightalsoaffectcharacterrecognition,whichisthefileformat.
Iagainhadissueswithcharacterrecognitionafterimplementingthistagintheproject'sweb.config.
Thistimeitwasonlyafewpageswheretheword"Descrição"
appeared as "Descri??o"
.
I tried some modifications, like putting the encode in the tag with "iso-8859-1". This only made the situation worse because Bootstrap is not compatible and the previous problem has returned.
So I decided to see the format of the cshtml files and found that on those pages that were giving this problem the encode was ANSI. If you open the file with notepad, for example, and ask "Save As", the window for choosing the file and destination location shows the current encode of it. So all I did was change to utf-8 and save. And then those pages returned to show the characters correctly.
How do I change the default of these files to ANSI? I do not know!
But finally, problem solved again.