V
V
Vitaly2016-09-01 14:28:30
Node.js
Vitaly, 2016-09-01 14:28:30

What working module for a node under Windows can be used for transcoding?

Please tell me a normal module for node , which under Windows adequately does the conversion from utf to win1251
If it's not difficult, using the example of converting the string str from utf8 to cp1251.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill, 2016-09-01
@kirill89

https://github.com/ashtuchkin/iconv-lite

var iconv = require('iconv-lite');
var fs = require('fs');

fs.writeFileSync('win1251.txt', iconv.encode('Привет!', 'win1251'));

d71e3b918a884b9f816926df269d9a21.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question