Skip to content

Commit 4bebf3a

Browse files
committed
Fix CID 1386098 (Dubious method used)
PrintStream depends on the default encoding if no encoding is given, so set UTF-8 encoding explicitly. Signed-off-by: Stefan Weil <[email protected]>
1 parent 0686cbe commit 4bebf3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/com/google/scrollview/ScrollView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public static void main(String[] args) {
380380
System.out.println("Client connected");
381381

382382
// Setup the streams
383-
out = new PrintStream(socket.getOutputStream(), true);
383+
out = new PrintStream(socket.getOutputStream(), true, "UTF-8");
384384
in =
385385
new BufferedReader(new InputStreamReader(socket.getInputStream(),
386386
"UTF8"));

0 commit comments

Comments
 (0)