1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-23 19:31:30 +00:00

Fixing squid:S1943 - Default system encoding should not be used.

This commit is contained in:
Faisal Hameed 2016-03-13 22:45:19 +05:00
parent 963704778a
commit 1d06411883
3 changed files with 4 additions and 4 deletions

View file

@ -135,7 +135,7 @@ public class LogActivity extends SyncthingActivity {
pb.redirectErrorStream(true); pb.redirectErrorStream(true);
process = pb.start(); process = pb.start();
BufferedReader bufferedReader = new BufferedReader( BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()), 8192); new InputStreamReader(process.getInputStream(), "UTF-8"), 8192);
StringBuilder log = new StringBuilder(); StringBuilder log = new StringBuilder();
String line = ""; String line = "";
String sep = System.getProperty("line.separator"); String sep = System.getProperty("line.separator");

View file

@ -80,7 +80,7 @@ public class GetTask extends AsyncTask<String, Void, String> {
if (entity != null) { if (entity != null) {
InputStream is = entity.getContent(); InputStream is = entity.getContent();
BufferedReader br = new BufferedReader(new InputStreamReader(is)); BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
String line; String line;
String result = ""; String result = "";
while ((line = br.readLine()) != null) { while ((line = br.readLine()) != null) {

View file

@ -242,7 +242,7 @@ public class SyncthingRunnable implements Runnable {
psOut.writeBytes("exit\n"); psOut.writeBytes("exit\n");
psOut.flush(); psOut.flush();
ps.waitFor(); ps.waitFor();
InputStreamReader isr = new InputStreamReader(ps.getInputStream()); InputStreamReader isr = new InputStreamReader(ps.getInputStream(), "UTF-8");
BufferedReader br = new BufferedReader(isr); BufferedReader br = new BufferedReader(isr);
String id; String id;
while ((id = br.readLine()) != null) { while ((id = br.readLine()) != null) {
@ -312,7 +312,7 @@ public class SyncthingRunnable implements Runnable {
@Override @Override
public void run() { public void run() {
try { try {
InputStreamReader isr = new InputStreamReader(is); InputStreamReader isr = new InputStreamReader(is, "UTF-8");
BufferedReader br = new BufferedReader(isr); BufferedReader br = new BufferedReader(isr);
String line; String line;
while ((line = br.readLine()) != null) { while ((line = br.readLine()) != null) {