|
@@ -21,6 +21,7 @@ package org.apache.hadoop.ant;
|
|
import java.io.ByteArrayOutputStream;
|
|
import java.io.ByteArrayOutputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.PrintStream;
|
|
import java.io.PrintStream;
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
import java.security.AccessController;
|
|
import java.security.AccessController;
|
|
import java.security.PrivilegedAction;
|
|
import java.security.PrivilegedAction;
|
|
import java.util.LinkedList;
|
|
import java.util.LinkedList;
|
|
@@ -146,8 +147,12 @@ public class DfsTask extends Task {
|
|
protected void pushContext() {
|
|
protected void pushContext() {
|
|
antOut = System.out;
|
|
antOut = System.out;
|
|
antErr = System.err;
|
|
antErr = System.err;
|
|
- System.setOut(new PrintStream(out));
|
|
|
|
- System.setErr(out == err ? System.out : new PrintStream(err));
|
|
|
|
|
|
+ try {
|
|
|
|
+ System.setOut(new PrintStream(out, false, "UTF-8"));
|
|
|
|
+ System.setErr(out == err ?
|
|
|
|
+ System.out : new PrintStream(err, false, "UTF-8"));
|
|
|
|
+ } catch (UnsupportedEncodingException ignored) {
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|