j809809jkdljfja
j809809jkdljfja

Reputation: 807

Saving 'Ł' and 'ł' characters as ascii/ansi file with nodejs

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

Answers (2)

A.Perrot
A.Perrot

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

wwn
wwn

Reputation: 593

ASCII does not have polish characters. See here: ASCII TABLE

Upvotes: 1

Related Questions