mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
Explicitly specify output encoding in marketcheck.
FileWriter uses "the default character encoding", which seems like asking to live in interesting times. The program assumes UTF-8 when it reads the file, so it should obviously do the same when it writes it back.
This commit is contained in:
parent
762d58f353
commit
1ba9f79888
1 changed files with 5 additions and 2 deletions
|
|
@ -101,10 +101,13 @@ class test {
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
System.out.println("..updating");
|
System.out.println("..updating");
|
||||||
File of = new File(filespec);
|
FileOutputStream fo = new FileOutputStream(filespec);
|
||||||
BufferedWriter wi = new BufferedWriter(new FileWriter(of));
|
OutputStreamWriter osr = new OutputStreamWriter(fo, "UTF-8");
|
||||||
|
BufferedWriter wi = new BufferedWriter(osr);
|
||||||
wi.write(output.toString());
|
wi.write(output.toString());
|
||||||
wi.close();
|
wi.close();
|
||||||
|
osr.close();
|
||||||
|
fo.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue