Compiler does not find file if it contains umlauts


New with v0.9.0

If inside the Typescript file there are umlauts in comments, the compiler does not do its job. It always gives back.
error TS5004: Could not find file: '....ts'.
Umlauts are special characters here in Germany. I guess the problem might also appear with other special characters from other countries.

I tried by storing the Typescript file as ANSI and as UTF-8, both did not work.

I tried by compiling from withing Web Essentials and from the command line, both did not work.

file attachments

Closed Jun 28, 2013 at 7:55 PM by danquirk


mgs_codeplex wrote Jun 20, 2013 at 7:34 AM

Correction: if the file is saved as UTF-8, it can be compiled.

Nevertheless, also ANSI has worked in the past.

MgSam wrote Jun 20, 2013 at 2:46 PM

I know you guys just closed a similar bug report, but you really need to fix this issue as it's a major regression. I had a file with the non-ASCII double quotes in it (forward and rear facing) and as of 0.9 the compiler suddenly says it "can't find the file", with no indication of what the real error was. It took me 30 minutes of stripping the file away piece by piece only to realize the issue was a few offending characters.

kanda wrote Jun 20, 2013 at 2:54 PM

I have the same problem with "czech" letters (Win-1250).
Workaround is saving file with enconding utf-8 with signature (meaning byte order mask).

When there is a byte order mask (signature), csc loads file as UTF-8.
When there is NO byte order mask, csc loads file with encoding depending on windows culture (czech windows means win-1250, english windows means Latin1 (afaik)). So it is not a good idea to have files with no byte order mask in multilingual envinronment.

In tsc this behavior is different. Tsc usually works with utf-8 with signature encoding, but causes this error with "special" characters in comments in files with no signature.

danquirk wrote Jun 21, 2013 at 3:26 AM

Thanks for the report, marking as active so all these issues get a look.

angelo68mn wrote Jun 21, 2013 at 8:52 AM

I had the same problem but it was also due to a syntax error.

Once replaced all the NO ANSSI char, I had some array declaration like
string[] a = new string[];
which gave me error.

Replaced the declaration with
string[] a = new Array<string>();

the problem has been solved.

billti wrote Jun 29, 2013 at 1:23 AM

FYI: See http://blogs.msdn.com/b/typescript/archive/2013/06/28/announcing-typescript-0-9-0-1.aspx . This improves the error handling in this situation.