benweet / stackedit

In-browser Markdown editor
https://stackedit.io/
Apache License 2.0
21.6k stars 2.71k forks source link

save as markdown utf-8 encoding #371

Open enricocavalli opened 10 years ago

enricocavalli commented 10 years ago

utf-8 characters are not encoded correctly from "save as..." -> markdown

for instance this is correct for "àèìòù"

data:application/octet-stream;charset=utf-8;base64,w6DDqMOsw7LDuQ==

regards, Enrico

benweet commented 10 years ago

Are you using Safari? I think it works differently on this browser.

enricocavalli commented 10 years ago

Yes sorry i thougt it was wrong everywhere. Latest Safari on Mac OS X

benweet commented 10 years ago

Can you confirm it works fine in another browser? (chrome or firefox basically)

enricocavalli commented 10 years ago

chrome or firefox actually download a file - safari only displays a data uri

benweet commented 10 years ago

Yes that's because FileSaver.js library does not work on Safari. See https://github.com/eligrey/FileSaver.js/issues/12

enricocavalli commented 10 years ago

thanks for the explanation. By the way accented characters are correctly written is saved even from safari. Also could be questionable setting a charset for mime type application/octet-stream.