eligrey / eligrey/FileSaver.js
Need to save as UCS-2 LE BOM ini file
- Dominant language
- JavaScript
- Stars
- 22k
- Forks
- 4.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I built an unique HTML page (I integrated FileSaver.js content at the HTML page end) to easy edit language.ini file of Jingle Palette ( https://github.com/nagyrobi/Jingle_Palette/blob/master/language.ini ).
But when I use the FileSaver functions, the file is saved as UTF-8 (can see it with Notepad++).
The Jingle Palette softare does'nt not recognize special characters.
If I look the original language.ini file, with Notepad++, I can see the encdogind is UCS-2 LE BOM .
The code I use in the function to create the downloadable file :
```
var blob = new Blob([contenu_ini], {type: "text/plain;charset=UTF-8"});
saveAs(blob, "language.ini");
```
Tried to change charset for
```
var blob = new Blob([contenu_ini], {type: "text/plain;charset=UCS-2"});
saveAs(blob, "language.ini");
```
or
```
var blob = new Blob([contenu_ini], {type: "text/plain;charset=ISO-10646-UCS-2"});
saveAs(blob, "language.ini");
```
The output file still in UTF-8 .
Can you help me please ?
Thanks :)
Couin
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.