(String text)
| 71 | private static native DetectResult jni_detect_charset(byte[] octets, String ref, String lang); |
| 72 | |
| 73 | static boolean isUTF8(String text) { |
| 74 | // Get extended ASCII characters |
| 75 | byte[] octets = text.getBytes(StandardCharsets.ISO_8859_1); |
| 76 | return isUTF8(octets); |
| 77 | } |
| 78 | |
| 79 | static boolean isUTF8(byte[] octets) { |
| 80 | return isValid(octets, StandardCharsets.UTF_8); |
no test coverage detected