Skip to content

项目为 UTF 8 环境,char c = '中',是否合法

cxuan edited this page Jun 15, 2020 · 1 revision

可以,因为 Unicode 编码采用 2 个字节的编码,UTF-8 是 Unicode 的一种实现,它使用可变长度的字符集进行编码,char c = '中' 是两个字节,所以能够存储。合法。

Clone this wiki locally