Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: runtime/bin/process_patch.dart

Issue 11472032: Reapply change to use system code page on Windows to fix Pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/process_patch.dart
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 4cdc85333ae9c0cf21325d3eaeeca963bab520d6..6646d07a18a6ca70f4e6e01b94323394c03ca4bd 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -2,6 +2,18 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+patch class _WindowsCodePageDecoder {
+ /* patch */ static String _decodeBytes(List<int> bytes)
+ native "SystemEncodingToString";
+}
+
+
+patch class _WindowsCodePageEncoder {
+ /* patch */ static List<int> _encodeString(String string)
+ native "StringToSystemEncoding";
+}
+
+
patch class Process {
/* patch */ static Future<Process> start(String executable,
List<String> arguments,
@@ -278,8 +290,8 @@ class _NonInteractiveProcess {
ProcessOptions options) {
_completer = new Completer<ProcessResult>();
// Extract output encoding options and verify arguments.
- var stdoutEncoding = Encoding.UTF_8;
- var stderrEncoding = Encoding.UTF_8;
+ var stdoutEncoding = Encoding.SYSTEM;
+ var stderrEncoding = Encoding.SYSTEM;
if (options != null) {
if (options.stdoutEncoding != null) {
stdoutEncoding = options.stdoutEncoding;

Powered by Google App Engine
This is Rietveld 408576698