-1
How should I proceed in Jquery so that the return request via json is / is with the correct accent? Current: "Monday, 12 de Março de 2018" Precise: "Monday, March 12, 2018"
I’m trying to use that:
$.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);
}
});
and with dataType: 'json', what happens?
– adventistaam
You’re calling this file
js
on some pagehtml
, right? If yes, put this on your tagscript
<script src="example.js" charset="utf-8"> </script>
– Jorge.M
dataType:"json" result is Monday 12 Mar&ccedil;o 2018.
– Diego Albuquerque
@Diegoalbuquerque already tried to do what I suggested?
– Jorge.M
I put charset="utf-8" in the script and tbm was not =/
– Diego Albuquerque
You have control of the code that generates this JSON?
– bfavaretto