TheQwertiest / foo_spider_monkey_panel

foobar2000 component that allows to use JavaScript to create CUI/DUI panels
https://theqwertiest.github.io/foo_spider_monkey_panel/
MIT License
267 stars 20 forks source link

utils.WriteTextFileV2 with UTF-16 #200

Open regorxxx opened 1 year ago

regorxxx commented 1 year ago

Self explanatory. Most JS string compression tools require UTF-16 for the output files.

https://pieroxy.net/blog/pages/lz-string/index.html https://github.com/pieroxy/lz-string ...

They can not be saved using native methods.

regorxxx commented 1 year ago
  const fso = new ActiveXObject('Scripting.FileSystemObject');
  const fileObj = fso.CreateTextFile(file, true, true);
  fileObj.Write(value);
  fileObj.Close();

Writes on UTF-16LE.