Skip to content

Commit

Permalink
default to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
dzaima committed Jun 30, 2021
1 parent b0cf1ef commit 28b3667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AndroidIDE/Interpreter.pde
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ static void rideSocket(RIDE r, Socket s) throws IOException {
for (int j = 0; j < 4; j++) i.read();
byte[] bs = new byte[len];
int p=0;while(p!=bs.length) p+= i.read(bs, p, bs.length-p);
String msg = new String(bs);
String msg = new String(bs, StandardCharsets.UTF_8);
if (msg.length()>400) println("received "+len+" "+msg.substring(0,400)+"");
else println("received "+msg);
if (num>=2) r.recv.add(a.parseJSONArray(msg));

0 comments on commit 28b3667

Please sign in to comment.