java - java中原始类型char的值指的是哪个Unicode表?

标签 java

想在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/

相关文章:

java - 使用冒泡排序和选择排序进行排序所需的时间

java - HttpClient 4 的代理设置不起作用

java - SnapHelper 项目位置

java - 将 String[] 转换为时间戳

java - 使用 STAX XMLStreamWriter 合并 XML

java - javax.imageio.ImageIO 坏了吗?它导入一些旋转的图像

java - 如何减少数据库连接失败的挂起时间

java - 使用 Spring Boot 2 时记录的 Flyway 弃用消息

java - Intent.getExtras 不起作用

java - 由 EnumSet 控制的互斥枚举