// NFD-normalized form of the class name static String NAME_NFD="ClassA\u0301"; // NFC-normalized form of the same class name static String NAME_NFC="Class\u00C1";
publicstaticvoid main(String[] args) throws IOException { if (!isMacOSX) {
System.out.println("This test is for Mac OS X only. Passing."); return;
}
String lang = System.getenv("LANG"); if (lang != null && !lang.contains("UTF-8")) {
System.out.println("LANG variable set to the language that " + "does not support unicode, test passes vacuously"); return;
}
File sourceFile = new File(NAME_NFC + ".java");
String source = "public class " + NAME_NFC + " { " + " public static void main(String args[]) {\n" + " System.out.println(\"Success!\");\n" + " }\n" + "}\n";
ArrayList<String> content = new ArrayList<>();
content.add(source); try {
createFile(sourceFile, content);
} catch (UnmappableCharacterException | InvalidPathException ipe) {
System.out.println("The locale or file system is configured in a way " + "that prevents file creation. Real testing impossible."); return;
}
HashMap<String, String> env = new HashMap<>();
env.put("LC_CTYPE", "UTF-8");
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.