Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top