Dmitry Stepanov
Dmitry Stepanov

Reputation: 2924

JSX in React component shows cyrillic text as habra-codabra

I create a standard ASP.NET Core 2.1 Web Application with a React Redux template.

In the Home component I want to change english language to cyrillic text like so:

enter image description here

When I ran it locally this code renders as the following:

enter image description here

Looks like JSX doesn't compile the files into UTF8 encoding. But I don't know how to check what encoding the files compiled to and how to change this behaviour.

Can you please advise me on that?

UPDATE:

In the head tag of index.html the charset is set to utf-8:

enter image description here

enter image description here

Upvotes: 3

Views: 1915

Answers (1)

Dmitry Stepanov
Dmitry Stepanov

Reputation: 2924

As Alexey Lebedev told the Home.js file had Windows-1251 encoding. After I changed the encoding manually in text editor to UTF-8, Cyrillic began to be displayed correctly.

Upvotes: 5

Related Questions