Skip to content

Commit 6bb94f6

Browse files
committed
fix output for command line on Windows
1 parent f23e65d commit 6bb94f6

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

java/src/processing/mode/java/Commander.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,18 @@ public Commander(String[] args) {
101101
int task = HELP;
102102
boolean embedJava = true;
103103

104-
// Turns out the output goes as MacRoman or something else useless.
105-
// http://code.google.com/p/processing/issues/detail?id=1418
106104
try {
107-
systemOut = new PrintStream(System.out, true, "UTF-8");
108-
systemErr = new PrintStream(System.err, true, "UTF-8");
109105
if (Platform.isWindows()) {
106+
// On Windows, it needs to use the default system encoding.
107+
// https://github.com/processing/processing/issues/1633
110108
systemOut = new PrintStream(System.out, true);
111109
systemErr = new PrintStream(System.err, true);
110+
} else {
111+
// On OS X, the output goes as MacRoman or something else useless.
112+
// http://code.google.com/p/processing/issues/detail?id=1418
113+
// (Not sure about Linux, but this has worked since 2.0)
114+
systemOut = new PrintStream(System.out, true, "UTF-8");
115+
systemErr = new PrintStream(System.err, true, "UTF-8");
112116
}
113117
} catch (UnsupportedEncodingException e) {
114118
e.printStackTrace();

todo.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
0249 (3.0.3)
2+
o arrow keys aren't working in the examples window
3+
X was working fine with most recent build.. weird
24

35

46
contribs
@@ -12,9 +14,9 @@ X https://github.com/processing/processing/issues/4308
1214
X https://github.com/processing/processing/pull/4309
1315
X Empty sketchbook message when sketchbook is empty
1416
X https://github.com/processing/processing/pull/4311
15-
_ processing-java output as UTF-8 makes Windows unhappy
16-
_ https://github.com/processing/processing/issues/1633
17-
_ includes possible fix for Windows
17+
X processing-java output as UTF-8 makes Windows unhappy
18+
X https://github.com/processing/processing/issues/1633
19+
X https://github.com/processing/processing/pull/4350
1820

1921
jakub
2022
X Update app to Java 8
@@ -36,6 +38,8 @@ X https://github.com/processing/processing/pull/4426
3638
_ double check that this is working on OS X
3739
X Java Mode refactoring
3840
X https://github.com/processing/processing/pull/4440
41+
X jump to variable declaration miss
42+
X https://github.com/processing/processing/issues/4287
3943
X Numbers in scientific notation not recognized as floats in 3.0
4044
X https://github.com/processing/processing/issues/4190
4145
X Adding .java files to sketch causes the Error Checker to weird out
@@ -60,8 +64,6 @@ _ Ignore memory options when exporting for ARM
6064
_ https://github.com/processing/processing/pull/4406
6165

6266

63-
_ arrow keys aren't working in the examples window
64-
6567
_ createPreprocessor() added to JavaEditor
6668
https://github.com/processing/processing/commit/2ecdc36ac7c680eb36e271d17ad80b657b3ae6a0
6769

0 commit comments

Comments
 (0)