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.

Sign up to request clarification or add additional context in comments.

2 Comments

I used asp.net mvc with angularjs
I don't know asp.net but it seems the encoding can be set this way stackoverflow.com/a/22319145/7557538

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.