privatestaticvoid check(boolean condition) { if (! condition) { new Error("test failed").printStackTrace();
failures++;
}
}
privatestaticboolean equals(byte[] ba, ByteBuffer bb) { if (ba.length != bb.limit()) returnfalse; for (int i = 0; i < ba.length; i++) if (ba[i] != bb.get(i)) returnfalse; returntrue;
}
publicstaticvoid main(String[] args) throws Exception { for (Map.Entry<String,Charset> e
: Charset.availableCharsets().entrySet()) {
String csn = e.getKey();
Charset cs = e.getValue();
// Delete the following lines when these charsets are fixed! if (csn.equals("x-JIS0208")) continue; // MalformedInput if (csn.equals("JIS_X0212-1990")) continue; // MalformedInput
if (! cs.canEncode()) continue;
CharsetEncoder enc = cs.newEncoder();
CharsetDecoder dec = cs.newDecoder();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.