the fs.writeFileSync encode default is UTF 8 I can't set the encode to big5. The documentation does not mention those encoding support. If this function does not support BIG5, what can I do?
var fs = require('fs');
var FilePath='./text.txt';
var Str='this is a test!';
var encode='utf8';
fs.writeFileSync(FilePath, Str, encode);
When I set encoding(var encode='big5';) BIG5, the server generates an error.
To use an encoding that isn't standard with Node Core. You can use iconv-lite.
It adds support for additional encodings including
big5, here is the full list of encodings.