Reputation: 807
I'm having hard time saving some polish characters like 'Ł' to a ascii file.
const fs = require('fs');
fs.writeFileSync('ascii.txt','Ł','ascii');
I would like the output file to show 'Ł' character. I tried buffers etc no luck. Can't figure out how to do this.
Upvotes: 1
Views: 1422
Reputation: 343
It is not possible.
Neither characters are part of the ASCII standard.
To save such characters to a file, you need to encode the file with a different encoding, such as UTF-8.
Upvotes: 4