Skip to content

Commit af96174

Browse files
committed
Chrome: Fix corrupted non-ASCII characters on file save
1 parent df265df commit af96174

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

js/core/file.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -533,10 +533,7 @@
533533
}).
534534
then(w => {
535535
writable = w;
536-
var data = fileToSave.contents;
537-
var rawdata = new Uint8Array(data.length);
538-
for (var i=0;i<data.length;i++) rawdata[i]=data.charCodeAt(i);
539-
var fileBlob = new Blob([rawdata.buffer], {type: "text/plain"});
536+
var fileBlob = new Blob([fileToSave.contents], {type: "text/plain"});
540537
return writable.write(fileBlob);
541538
}).
542539
then(() => writable.close()).

0 commit comments

Comments
 (0)