discoy / roottools

Automatically exported from code.google.com/p/roottools
0 stars 0 forks source link

Commands with special characters fails #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
run:
RootTools.sendShell("ls -l /sdcard/äüß", 0, result, 10000);

Result.processError(String) called with 
"/sdcard/???: No such file or directory"

A quick look at the sources of Shell.java showed me the possible reason:
https://code.google.com/p/roottools/source/browse/trunk/Developmental/RootTools_
sdk3_generic/src/com/stericson/RootTools/execution/Shell.java#60

proc = new ProcessBuilder(cmd).redirectErrorStream(true).start();
in = new BufferedReader(new InputStreamReader(proc.getInputStream()));
out = new OutputStreamWriter(proc.getOutputStream(), "UTF-8");

UTF-8-Encoding is enabled for the output, but not for the input.

Original issue reported on code.google.com by oliver.e...@gmail.com on 31 Mar 2013 at 3:32

GoogleCodeExporter commented 9 years ago
This will be addressed. Thank you.

Original comment by Stericso...@gmail.com on 8 Apr 2013 at 8:16

GoogleCodeExporter commented 9 years ago
This has been completed.

Original comment by Stericso...@gmail.com on 10 Jul 2013 at 1:47