1
I have that code
$.ajax({
url: "https://crossorigin.me/http://www.acidigital.com/rss/rss_santo.php",
crossDomain: true,
contentType: "application/xml; charset:utf-8",
type: "GET",
dataType: "xml",
success: function (re) {
console.log(re) // documento XML puro
}
})
It turns out that the XML document of this request (http://www.acidigital.com/rss/rss_santo.php) comes with special characters replaced by "".
In the XML source you see the ISO-8859-1 declaration in the first line: <?xml version="1.0" encoding="ISO-8859-1"? > And you’re treating as utf-8 in your code. Working that would be the starting point.
– Bacco
@Bacco just want to replace the correct characters. In fact all accented letters look like this.
– ropbla9
Almost Bob, and use
contentType: "application/xml; charset:ISO-8859-1"
and not UTF-8– KingRider
@Kingrider tried, the same.
– ropbla9
It must be your php has some wrong charset and puts the returno
utf8_encode("texto texto texto);
– KingRider
@Kingrider PHP is not mine, only consumption, when I took this XML by another AJAX engine with proxy came without this problem.
– ropbla9
@ropbla9 understood, and I’ll think how to convert for you =S
– KingRider
@ropbla9 I found about conversion is
overrideMimeType('text/html;charset=iso-8859-1')
and it’s not for jquery and pure has (Xmlhttprequest) to work, and I haven’t found jquery solution for mime. I already closed the code ready under this done. see you.– KingRider