File tree 1 file changed +5
-2
lines changed
core/ts.core/src/ts/nodejs
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 15
15
16
16
public class NodejsProcess extends AbstractNodejsProcess {
17
17
18
+ // tsserver works with UTF_8 enconding.
19
+ private static final String UTF_8 = "UTF-8" ;
20
+
18
21
private final File tsFile ;
19
22
20
23
/**
@@ -71,7 +74,7 @@ public void run() {
71
74
try {
72
75
try {
73
76
notifyStartProcess (0 );
74
- BufferedReader r = new BufferedReader (new InputStreamReader (process .getInputStream ()));
77
+ BufferedReader r = new BufferedReader (new InputStreamReader (process .getInputStream (), UTF_8 ));
75
78
String line = null ;
76
79
while ((line = r .readLine ()) != null && process != null ) {
77
80
notifyMessage (line );
@@ -121,7 +124,7 @@ public void start() {
121
124
builder .directory (getProjectDir ());
122
125
123
126
this .process = builder .start ();
124
- this .out = new PrintStream (process .getOutputStream ());
127
+ this .out = new PrintStream (process .getOutputStream (), false , UTF_8 );
125
128
126
129
errThread = new Thread (new StdErr ());
127
130
errThread .setDaemon (true );
You can’t perform that action at this time.
0 commit comments