问题描述
我正在使用 fs.writefile
,但无法将其保存在 ANSI1255 中。
该文件采用 UTF-8 编码。
const encodedData = windows1255.encode(doc);
不要为我工作
解决方法
你不能像这样使用可选的 options.encoding
参数吗?
filehandle.writeFile(data,{
encoding: 'ANSI1255' // or whatever it's called properly
});
如果这不起作用,这可能:https://stackoverflow.com/a/53855344/7451109