code: @SuppressWarnings("checkstyle:magicnumber")
      private static String escapeCharacter(final char ch) {
          final String prefix;
  
          if (ch < 0x10) {
              prefix = "000";
          } else if (ch < 0x100) {
              prefix = "00";
          } else if (ch < 0x1000) {
              prefix = "0";
          } else {
              prefix = "";
          }
  
          return "\\u" + prefix + Integer.toHexString(ch);
      }
docs: Escapes character to unicode string representation (&#92;uXXXX).
  
  @param ch character to be escaped.
  @return escaped representation of character.