0

I have resources.json file which looks like:

...
{
  "MyStatus": "Beëindigd"
},
...

I display in a table that string

<td data-i18n="MyStatus"></td>

When app loads, the resource file downloaded from server looks like:

{"MyStatus":"BeA«indigd"}

And response header (seems to have charset utf-8):

enter image description here

How to display Beëindigd instead of BeA«indigd ?

What should do here ?

0

1 Answer 1

0

Setting charset in header response does not ensure the data source is properly encoded as UTF-8.

First, open your resources.json file in an editor like VSCode or Sublime and check it's encoded in UTF-8 and not another charset.

Then, check your source code files on server side are also encoded as UTF-8.

Finally, if you're using Java to serve your API, check that the JVM is started with the UTF-8 encoding and not the system default charset which is sometimes different.
Use java -Dfile.encoding=UTF-8 to do this.

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.