This project is read-only.


UTF-8 files with BOM are not compiled


It seems that TypeScript compiler "tsc" just cann't read file in UTF-8 with BOM - such files are created by Visual Studio by default. After that they cann't be compiled by tsc - without any error message. When such file is referenced via "///' comment - tsc treated them as if they are just empty.

It's very annoying - remove BOM manually after each new "*.ts" file creation in VisualStudio.
Closed Nov 5, 2012 at 11:29 PM by mhegazy
This should be fixed in the develop branch with change


jopamer wrote Oct 5, 2012 at 8:20 PM

Thanks! This is something we're currently looking into.

popopome wrote Oct 9, 2012 at 12:09 AM

I spent several hours to understand what was wrong with my Win8 Project with typescript. It was totally upset after finding BOM issue. Please fix the issue. This is really painful to create/add each TS file within VS.

bigsan wrote Oct 26, 2012 at 11:19 AM

The readFile function in io.ts used Scripting.FileSystemObject to read text file, which supports only system encoding, utf-16 and utf-16 big endian encoding, it causes issues in non-english OS like Chinese, Japanese...!

This can be solved by using ADODB.Stream instead, I've wrote a snippet at