I am saving a file as utf8 - with signature. I then run tsc.exe on that file and it generates a utf8 - without signature file. When I open that file in Visual Studio it appears identical but when I run it in VS the file encoding is misinterpreted.
For example:
[test.ts: UTF8 - With signature]
document.write(" ¢ £ ¥ € § © ® ™");
tsc.exe test.ts
-
generates test.js: UTF8 - Without signature
[test.html]
<html>
<head>
<title>test</title>
<script type="text/javascript" src="test.js"></script>
</head>
<body>
</body>
</html>
[result: IE, Chrome]
î„ Â¢ £ Â¥ € § © ® â„¢
- in vs manually save test.js as UTF8 - With signature
-
refresh browsers
[result: IE, Chrome]
¢ £ ¥ € § © ® ™