JSON characters changed in Angular HTTP GET

I am trying to get a JSON object from a fallback service. When I connect the url to my browser (Firefox or Chrome), I get JSON with the correct UTF-8 encoding:



However, when I try to GET the same URL in my Angular app, the text is not encoded correctly. This is the object printed to the JavaScript console:

    { name: "Universit "}


Here is the code I'm using in Angular:


        method: "GET",
        url: 'localhost:8080/my/url/location',
        headers : {





    /* the rest of the success function */ 


    /* the rest of the failure function */ 



Any ideas? Thanks in advance!


source to share

1 answer

The problem was not with the code, but that the source file for the JSON was not encoded in UTF-8



All Articles