Reputation: 5508
I have a field definition in TypeScript that looks like that:
languages: Array<{}> = [{ key: "fr", name: "français" }];
When the TypeScript file gets compiled the output in the JavaScript looks like:
this.languages = [{ key: "fr", name: "fran�ais" }];
Why does the transpiler change the literals and how can I prevent that?
Upvotes: 1
Views: 102
Reputation: 5508
Ah, got it by myself...
The TypeScript file was saved using the default Western European (Windows) - Codepage 1252
encoding; I changed that to Unicode (UTF-8 with signature) - Codepage 65001)
which fixed the problem.
Upvotes: 1