Failed to execute ‘btoa’ on ‘Window’: The string to be encoded contains characters outside of the Latin1 range.
The error in the title is thrown only in Google Chrome, according to my tests. I’m base64 encoding a big XML file so that it can be downloaded: this.loader.src = “https://stackoverflow.com/questions/23223718/data:application/x-forcedownload;base64,”+ btoa(“<?xml version=\”1.0\” encoding=\”utf-8\”?>” +”<“+this.gamesave.tagName+”>” +this.xml.firstChild.innerHTML +”</”+this.gamesave.tagName+”>”); this.loader is hidden iframe. This error is actually quite a change because normally, Google Chrome would crash upon … Read more