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 ?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Snake Eyes
  • 16,287
  • 34
  • 113
  • 221

1 Answers1

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.

Stephane Janicaud
  • 3,531
  • 1
  • 12
  • 18