TypeScript: Error TS5013: Unsupported encoding for file ‘file.ts’ (FIX)
by admin on Jul.22, 2013, under Programming
When attempting to compile one of my TypeScript files in Visual Studio 2012 today, I noticed I received error messages saying
error TS5013: Unsupported encoding for file 'file.ts' error TS5004: Could not find file: 'file.ts'
I was unsure why this occured all of sudden. It turned out the encoding of my file had changed, so I simply opened up the file in Notepad++ and changed the encoding from ANSI back to UTF-8. Obviously, some special characters got lost by this conversion, however, the TypeScript file compiled successfully afterwards.