I use Web essentials to compile my typescript files on save (Visual Studio 2012), but i got an empty js and this message :
Compile Error.
See error list for details
error TS5012: Cannot read file 'C:/Users/Nor/Documents/Tribway/tribway-InvitationPage/Tribway/Scripts/Tribway/Invitations.ts': Unsupported file encoding.
I had this problem with TypeScript version 0.9.1.1 using Visual Studio 2012. The issue was caused by me inserting a UK pound currency symbol into the file when the file had a 'Western European (Windows) - Codepage 1252' encoding.
The solution was to save the file with a UTF-8 encoding (which I would have expected it to have had in the first place).
To do this in Visual Studio click on File -> Advanced Save Options and choose an encoding of 'Unicode (UTF-8 with signature) - Codepage 65001' and then save your file. The TypeScript compiler is then happy again.
File encoding was an issue with TS 0.9.0 Fixed in the latest version. You can download 0.9.1 from here : https://typescript.codeplex.com/releases/view/102929
PS: I recommend uninstalling WebEssentials before installing 0.9.1 as they tend to conflict (webessentials starts to leak memory). TS 0.9.1 has pretty awesome and stable support for Visual Studio 2012
I have the same issue with TS 0.9.1, first with WebEssentials installed and then (on a clean installation) with WebEssentials. I found no information for fixing it.
I know this is not a solution, but I returned to TS 8.1.0, with this version I don't have the error "Unsupported file encoding".
I'll try the next version of TS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With