Skip to content

Commit

Permalink
Fix CID 1386098 (Dubious method used)
Browse files Browse the repository at this point in the history
PrintStream depends on the default encoding if no encoding is given,
so set UTF-8 encoding explicitly.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jun 29, 2018
1 parent 0686cbe commit 4bebf3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/com/google/scrollview/ScrollView.java
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public static void main(String[] args) {
System.out.println("Client connected");

// Setup the streams
out = new PrintStream(socket.getOutputStream(), true);
out = new PrintStream(socket.getOutputStream(), true, "UTF-8");
in =
new BufferedReader(new InputStreamReader(socket.getInputStream(),
"UTF8"));
Expand Down

0 comments on commit 4bebf3a

Please sign in to comment.