mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 16:28:51 -05:00
ISO-8859-8-I is not supported, but ISO-8859-8 uses the same code points so we can use that instead
This commit is contained in:
parent
6145508272
commit
758bd7f817
@ -246,14 +246,21 @@ public final class FileUtilities {
|
|||||||
CharsetMatch match = detector.detect();
|
CharsetMatch match = detector.detect();
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
Reader reader = match.getReader();
|
Reader reader = match.getReader();
|
||||||
|
|
||||||
|
// reader may be null if detected character encoding is not supported
|
||||||
if (reader != null) {
|
if (reader != null) {
|
||||||
return reader;
|
return reader;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reader may be null if detected character encoding is not supported
|
// ISO-8859-8-I is not supported, but ISO-8859-8 uses the same code points so we can use that instead
|
||||||
|
switch (match.getName()) {
|
||||||
|
case "ISO-8859-8-I":
|
||||||
|
return new InputStreamReader(in, Charset.forName("ISO-8859-8"));
|
||||||
|
default:
|
||||||
debug.warning("Unsupported charset: " + match.getName());
|
debug.warning("Unsupported charset: " + match.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// default to declared encoding
|
// default to declared encoding
|
||||||
return new InputStreamReader(in, declaredEncoding);
|
return new InputStreamReader(in, declaredEncoding);
|
||||||
|
Loading…
Reference in New Issue
Block a user