如何用Unicode编码表示中文

1.汉字转Unicode编码工具
http://tool.chinaz.com/tools/unicode.aspx

 char a = '\u90d1';
 char b = '\u6dfc';
 char c = '\u946b';
 System.out.println(a+""+b+""+c);

注意:在输出多个字符时,要用""连接字符。

猜你喜欢

转载自blog.csdn.net/qq_37745636/article/details/84900403
今日推荐