Simon Vkk
Simon Vkk

Reputation: 21

Asp.NET Core using React - UTF8 not recognized

I have an Asp.NET Core application with React.

Despite the fact that I specified in all of my layouts and head tag:

<meta http-equiv="Content-type" content="text/html; charset=UTF-8">

or

<meta charset="utf-8" />

my application does not support accents ...

accents not supported

Can you help me?

Upvotes: 1

Views: 1400

Answers (2)

Simon Vkk
Simon Vkk

Reputation: 21

Thank you @Karney for your answer.

Unfortunately I am working on visual studio 2019 and I did not find this option.

However, I found an alternative.

I saved all of my files with encoding one by one.

(Screenshots in French)

  1. Save file as...
  2. save with encoding
  3. Choose encoding style

That's all.

It may take a little while depending on the number of files, but it works.

Upvotes: 1

Karney.
Karney.

Reputation: 5031

I use ie to test <meta charset="utf-8" />. Changing ie's encoding to other will restore normal fonts. And it is related to the code editor, please check the code of your editor.

Take my compiler (visual studio code) as an example. The encoding of the current page is in the lower right corner.

enter image description here

When I change it to another encoding, garbled characters will be generated on the page.

Upvotes: 0

Related Questions