Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Java基础入门第7问 单个char型变量不一定能存储一个汉字 #6

Open
discord9 opened this issue Apr 20, 2022 · 1 comment

Comments

@discord9
Copy link

java.lang Class Character
单个char型变量能保存的16个比特代表的Basic Multilingual Plane中,只有少数几组是CJK的比如汉字笔画和标点符号
而UTF-16采用的编码中大部分汉字都需要两个16-bit code units来表示,也就是32比特

@Litexplorer
Copy link

Litexplorer commented Apr 20, 2022 via email

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants