Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/03/2014, 12:10
ShotoReaper
 
Fecha de Ingreso: septiembre-2012
Mensajes: 38
Antigüedad: 11 años, 7 meses
Puntos: 0
No consigo guardar un archivo con un texto con acentos usando Filesystem

Estoy intentando guardar un archivo con la palabra "acción" usando Filesystem. El problema es que en el archivo final aparece la palabra de esta manera:

acción

Este es mi código:

Código:
navigator.webkitPersistentStorage.requestQuota(1024*1024, function() {
    window.webkitRequestFileSystem(window.TEMPORARY , 1024*1024, function(fileSystem) {

fileSystem.root.getFile("factura.txt", {create: true}, function(entry) {
      var fileEntry = entry;

      entry.createWriter(function(writer) {
         writer.onwrite = function(evt) {
        };

        var file = new Blob(["acción"]),  {type: "text/plain"});
        writer.write( file );            
      }, function(error) {
      });        


   }, function(error){
   });                     

},

});