Open Hixie opened 10 months ago
Thanks for the details!
Triaging under front-end
and cfe-crashes
, because a more user friendly/explanatory error message here would be helpful.
As a side note, while the spec doesn't define a specified encoding for the Dart language (https://github.com/dart-lang/language/issues/2186), perhaps we should do so more specifically for the SDK and its tooling on the website?
If you encode the following file as UTF-16, and try to run it with
dart test.dart
, the Dart parser crashes:The following nearly identical file encoded the same way will cause the Dart parser to complain that it cannot decode invalid UTF-8:
The crash is:
The error message for the second file makes sense if we only support UTF-8:
The files are identical other than the contents of the comment: