Description
default: if (c < ' ') { buff.append(String.format("\\u%04x", (int) c)); } else if (c >= 0xd800 && c <= 0xdbff) { // isSurrogate(), only available in Java 7 if (i < length - 1 && Character.isSurrogatePair(c, s.charAt(i + 1))) { // ok surrogate buff.append(c); buff.append(s.charAt(i + 1)); i += 1; } else { // broken surrogate -> escape buff.append(String.format("\\u%04x", (int) c)); } } else { buff.append(c); }
Attachments
Issue Links
- links to