[Chartjs]-Chart.js fields not showing characters correctly

0👍

The solve this, first include at web.config:

<system.web>
    <globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-BR" uiCulture="pt-BR" />
</system.web>

Then check each JS and HTML files for the correct encoding. With Notepad++, open each JS/HTML file (via Windows, outside Visual Studio) and check file encoding, expected is UTF-8 BOM. I’ve had several files with ANSI format. To change, Notepad++ has a builtin tool available at the menu, then you just save the updated file.

Notepad++ file encoding

Finally, open Visual Studio and those changes should appear automatically and you can upload/commit them to your repository.

1👍

Try to replace ó by its HexCode as follows.

title: {
  display: true,
  text: 'C' + '\xF3' + 'digo'
}

or…

title: {
  display: true,
  text: 'Código'.replace('ó', '\xF3')
}

Leave a comment