Version 2.16.0-156.0.dev
Merge commit '8bdd732e08300f7c606e9a909b47cdd3dd2553a1' into 'dev'
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index 6a8fecd..ac9131a 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -37,6 +37,7 @@
bool allowVariableMinification = true,
List<CodeOutputListener> listeners = const []}) {
JavaScriptPrintingOptions options = JavaScriptPrintingOptions(
+ utf8: compilerOptions.features.writeUtf8.isEnabled,
shouldCompressOutput: compilerOptions.enableMinification,
minifyLocalVariables: allowVariableMinification);
CodeBuffer outBuffer = CodeBuffer(listeners);
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index b0be710..c2efa63 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -76,6 +76,9 @@
/// Whether to generate code compliant with Content Security Policy.
FeatureOption useContentSecurityPolicy = FeatureOption('csp');
+ /// Whether to emit JavaScript encoded as UTF-8.
+ FeatureOption writeUtf8 = FeatureOption('utf8');
+
/// [FeatureOption]s which are shipped and cannot be toggled.
late final List<FeatureOption> shipped = [
newHolders,
@@ -84,11 +87,13 @@
/// [FeatureOption]s which default to enabled.
late final List<FeatureOption> shipping = [
legacyJavaScript,
- useContentSecurityPolicy
+ useContentSecurityPolicy,
];
/// [FeatureOption]s which default to disabled.
- late final List<FeatureOption> canary = [];
+ late final List<FeatureOption> canary = [
+ writeUtf8,
+ ];
/// Forces canary feature on. This must run after [Option].parse.
void forceCanary() {
diff --git a/pkg/test_runner/lib/src/browser.dart b/pkg/test_runner/lib/src/browser.dart
index 6625a5a..f7174a2 100644
--- a/pkg/test_runner/lib/src/browser.dart
+++ b/pkg/test_runner/lib/src/browser.dart
@@ -14,6 +14,7 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta charset="utf-8">
<meta name="dart.unittest" content="full-stack-traces">
<title> Test $title </title>
<style>
@@ -172,6 +173,7 @@
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta charset="utf-8">
<meta name="dart.unittest" content="full-stack-traces">
<title>Test $testName</title>
<style>
diff --git a/pkg/test_runner/lib/src/browser_controller.dart b/pkg/test_runner/lib/src/browser_controller.dart
index 2920dc1..607c5f1 100644
--- a/pkg/test_runner/lib/src/browser_controller.dart
+++ b/pkg/test_runner/lib/src/browser_controller.dart
@@ -1342,6 +1342,7 @@
<!DOCTYPE html><html>
<head>
<title>Driving page</title>
+ <meta charset="utf-8">
<style>
.big-notice {
background-color: red;
diff --git a/pkg/test_runner/lib/src/testing_servers.dart b/pkg/test_runner/lib/src/testing_servers.dart
index ca69031..ac04529 100644
--- a/pkg/test_runner/lib/src/testing_servers.dart
+++ b/pkg/test_runner/lib/src/testing_servers.dart
@@ -301,6 +301,7 @@
<html>
<head>
<title>${request.uri.path}</title>
+ <meta charset="utf-8">
</head>
<body>
<code>
diff --git a/tools/VERSION b/tools/VERSION
index 930eb4d..ba0dee3 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 16
PATCH 0
-PRERELEASE 155
+PRERELEASE 156
PRERELEASE_PATCH 0
\ No newline at end of file