Implement skinCharset option that allows to set the
encoding for skin files to something else than the platform's file.encoding.
This commit is contained in:
parent
cf6d9b8330
commit
f334900a79
1 changed files with 8 additions and 1 deletions
|
@ -97,8 +97,15 @@ public final class SkinFile implements Updatable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void read() {
|
private void read() {
|
||||||
|
String encoding = app.getProperty("skinCharset");
|
||||||
try {
|
try {
|
||||||
FileReader reader = new FileReader(file);
|
Reader reader;
|
||||||
|
if (encoding == null) {
|
||||||
|
reader = new FileReader(file);
|
||||||
|
} else {
|
||||||
|
FileInputStream in = new FileInputStream(file);
|
||||||
|
reader = new InputStreamReader(in, encoding);
|
||||||
|
}
|
||||||
char[] c = new char[(int) file.length()];
|
char[] c = new char[(int) file.length()];
|
||||||
int length = reader.read(c);
|
int length = reader.read(c);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue