想在java中查找原始类型char
的值的编码表,听说java内部使用Unicode。 java中原始类型char
的值指的是哪个Unicode表?
最佳答案
如 the Oracle documentation 中所述:
When the specification for the Java language was created, the Unicode standard was accepted and the char primitive was defined as a 16-bit data type, with characters in the hexadecimal range from 0x0000 to 0xFFFF.
Because 16-bit encoding supports 216 (65,536) characters, which is insufficient to define all characters in use throughout the world, the Unicode standard was extended to 0x10FFFF, which supports over one million characters. The definition of a character in the Java programming language could not be changed from 16 bits to 32 bits without causing millions of Java applications to no longer run properly. To correct the definition, a scheme was developed to handle characters that could not be encoded in 16 bits.
The characters with values that are outside of the 16-bit range, and within the range from 0x10000 to 0x10FFFF, are called supplementary characters and are defined as a pair of char values.
查看unicode字符表here .
关于java - java中原始类型char的值指的是哪个Unicode表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22903406/