Back to Intellij Community

UnnecessaryUnicodeEscape

java/java-impl/resources/inspectionDescriptions/UnnecessaryUnicodeEscape.html

2025.3-rc-2357 B
Original Source

Reports unnecessary Unicode escape sequences. A Unicode escape sequence is unnecessary when the file encoding can handle the character without escaping it. This inspection does not report Unicode control characters, except for line feed and horizonal tab.

Example:

String s = "\u0078";

After the quick-fix is applied:

String s = "x";