Accentuation x JSON (Jquery)

0

How do I proceed in Jquery so that the return of the request via json is with the correct accent? Current: "Monday, March 12 & 2018" I need: "Monday, March 12, 2018"

I'm trying to use this:

$.ajax({
        async:false,
        type: "GET",
        url: "portal.local/servico/datas/",
        dataType: "text",
        contentType: "application/x-www-form-urlencoded;charset=ISO-8859-1",
        success: function (data) {
           alert(data);
        }
    });
    
asked by anonymous 12.03.2018 / 15:30

1 answer

0

If it's a php page that returns json's seven head.

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
echo json_encode(<strong>"meu array", JSON_UNESCAPED_UNICODE);
    
12.03.2018 / 16:20