Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
index 03baa2aec..88cf70b0c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -83,6 +83,7 @@ import org.eclipse.ui.progress.UIJob;
import com.ibm.icu.text.MessageFormat;
+
/**
* A console for a system process with standard I/O streams.
*
@@ -671,13 +672,18 @@ public class ProcessConsole extends IOConsole implements IConsole, IDebugEventSe
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
protected IStatus run(IProgressMonitor monitor) {
+ String encoding = getEncoding();
try {
byte[] b = new byte[1024];
int read = 0;
while (fInput != null && read >= 0) {
read = fInput.read(b);
if (read > 0) {
- String s = new String(b, 0, read);
+ String s;
+ if (encoding != null)
+ s = new String(b, 0, read, encoding);
+ else
+ s = new String(b, 0, read);
streamsProxy.write(s);
}
}

Back to the top