mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-11-08 19:46:10 +01:00
Use constant for utf-8 encoding
This commit is contained in:
parent
1e4fa8c045
commit
4df285013e
1 changed files with 2 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ import java.io.IOException;
|
|||
import java.io.InputStreamReader;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
|
@ -125,9 +126,8 @@ final class TermuxPreferences {
|
|||
Properties props = new Properties();
|
||||
try {
|
||||
if (propsFile.isFile() && propsFile.canRead()) {
|
||||
String encoding = "utf-8"; // most useful default nowadays
|
||||
try (FileInputStream in = new FileInputStream(propsFile)) {
|
||||
props.load(new InputStreamReader(in, encoding));
|
||||
props.load(new InputStreamReader(in, StandardCharsets.UTF_8));
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue