React/Next: Fetched json data isn’t display correctly. Do I have to convert from iso-8859-1 to utf-8?

I am using React/Next.js and am fetching json data from an API.
The response from fetching data says the charset is iso-8859-1.
I am using utf-8 in my application.

When I try to display the fetched data in my react app some Chars (like € sign) aren’t displayed. When I print it to console the € sign is displayed like this: x80

Do I have to somehow convert the data I fetch from the API?

Source: React – Stack Overflow

September 29, 2021
Category : News
Tags: encoding | next | reactjs

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.