如果您正在寻找一个可以向您提供此信息的课程,这并非易事.
通常,Java支持的Unicode版本会从一个主要规范更改为另一个主要规范,并且此信息记录在Java API文档的Character类(源自Java语言规范)中.但是,您不能像每个major version of Java need not have its own version of the Java Language Specification那样依赖Java语言规范.
因此,您应该在JVM支持的Java版本和支持的Unicode版本之间进行音译:
String specVersion = System.getProperty("java.specification.version");
if(specVersion.equals("1.7"))
return "6.0";
else if(specVersion.equals("1.6"))
return "4.0";
else if(specVersion.equals("1.5"))
return "4.0";
else if(specVersion.equals("1.4"))
return "3.0";
... and so on
支持的版本的详细信息可以从Java语言规范中获得.参考JSR 901这是Java 7的语言规范:
The Java SE platform tracks the Unicode specification as it evolves.
The precise version of Unicode used by a given release is specified in
the documentation of the class Character.
Versions of the Java programming language prior to 1.1 used Unicode version 1.1.5. Upgrades to newer versions of the Unicode Standard occurred in JDK 1.1 (to Unicode 2.0), JDK 1.1.7 (to Unicode 2.1), Java SE 1.4 (to Unicode 3.0), and Java SE 5.0 (to Unicode 4.0).