public static String unicodeEscaped(char ch) {
        if (ch < 0x10) {
            return "\\u000" + Integer.toHexString(ch);
        } else if (ch < 0x100) {
            return "\\u00" + Integer.toHexString(ch);
        } else if (ch < 0x1000) {
            return "\\u0" + Integer.toHexString(ch);
        }
        return "\\u" + Integer.toHexString(ch);
    }
<p>Converts the string to the Unicode format '\u0020'.</p>

<p>This format is the Java source code format.</p>

<pre>
  CharUtils.unicodeEscaped(' ') = "\u0020"
  CharUtils.unicodeEscaped('A') = "\u0041"
</pre>

@param ch  the character to convert
@return the escaped Unicode string
android/android_framework/base/src/main/java/lang3/CharUtils.java