Question

I have a javascript file encoded in UTF-8 (with BOM). I'd like its minified counterpart to also be UTF-8 with BOM. But whenever I update the original file, the generated one reverts to ANSI.

I've tried using Visual Studio to overwrite the generated file using my preferred encoding (as suggested by TypeScript error Web essential), but without any luck.

Was it helpful?

Solution

I was able to force the minified files to save as UTF-8 with BOM by toggling on the "Save UTF-8 files with BOM" option:

Tools > Options > Web Essentials > Misc > Save UTF-8 files with BOM

Not sure how one would save as UTF-8 without BOM, but thankfully I don't need to.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top