I'm having troubles getting the correct encoding for a text file with xhr.
xhr(content.getContentUrl(), {
handleAs: "text",
headers: { 'Content-Type': 'text/plain; charset=iso-8859-1' }
}).then(function (data) {
console.log("DATA");
console.log(data); ... );
The data object is a text file that should be with ISO-8859-1 characters, but I get a ? instead of the special character, it's like the response encoding is UTF-8
Example: "PER-RW-C-MC-013,B,ABB, P�rtico 5B. Fundaciones. Memoria de C�lculo,17/06/2011,23/06/2011,17/06/2011,01/07/2011,24/06/2011,20/07/2011,24/06/2011,19/07/2011,0,PER-RW-C-MC-013-C,PER-RW-C-MC-013-A"
Note: The content.getContentUrl() is a method from IBM filenet API that returns the text file URL in a filenet Repository.
Thanks in advance.