3 回答
TA贡献1788条经验 获得超4个赞
Java Escape Sequences:
\u{0000-FFFF} /* Unicode [Basic Multilingual Plane only, see below] hex value
does not handle unicode values higher than 0xFFFF (65535),
the high surrogate has to be separate: \uD852\uDF62
Four hex characters only (no variable width) */
\b /* \u0008: backspace (BS) */
\t /* \u0009: horizontal tab (HT) */
\n /* \u000a: linefeed (LF) */
\f /* \u000c: form feed (FF) */
\r /* \u000d: carriage return (CR) */
\" /* \u0022: double quote (") */
\' /* \u0027: single quote (') */
\\ /* \u005c: backslash (\) */
\{0-377} /* \u0000 to \u00ff: from octal value
1 to 3 octal digits (variable width) */
这个基本多语言平面0x0000-0xFFFF(0-65535)中的Unicode值。其他的平面只能用多个字符在Java中指定:埃及的Heiroglyph A 054(躺在地上的花花公子)是U+1303F / 𓀿会被破门而入"\uD80C\uDC3F"(utf-16)用于Java字符串。其他一些语言支持更高层次的"\U0001303F".
添加回答
举报