Skip to content

Commit e5e4cf7

Browse files
committedDec 17, 2018
fix output encoding problem. close alibaba#376
1 parent f1c4aa1 commit e5e4cf7

File tree

1 file changed

+5
-3
lines changed
  • client/src/main/java/com/taobao/arthas/client

1 file changed

+5
-3
lines changed
 

‎client/src/main/java/com/taobao/arthas/client/IOUtil.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.IOException;
44
import java.io.InputStream;
5+
import java.io.InputStreamReader;
56
import java.io.OutputStream;
67
import java.io.Writer;
78

@@ -41,12 +42,13 @@ public void run() {
4142
@Override
4243
public void run() {
4344
try {
45+
InputStreamReader reader = new InputStreamReader(remoteInput);
4446
while (true) {
45-
int singleByte = remoteInput.read();
46-
if (singleByte < 0) {
47+
int singleChar = reader.read();
48+
if (singleChar == -1) {
4749
break;
4850
}
49-
localOutput.write(singleByte);
51+
localOutput.write(singleChar);
5052
localOutput.flush();
5153
}
5254
} catch (IOException e) {

0 commit comments

Comments
 (0)
Please sign in to comment.