code: public static String unicodeEncode(String s) {
          StringBuilder buf = new StringBuilder();
          for (int i = 0; i < s.length(); ++i) {
              char ch = s.charAt(i);
              if (ch >= '\u0080') {
                  String st = Integer.toHexString(0x10000 + (int) ch);
                  while (st.length() < 4) st = "0" + st;
                  buf.append("\\u").append(st.subSequence(1, 5));
              } else {
                  buf.append(ch);
              }
          }
          return buf.toString();
      }
docs: unicode encoding (for verbose mode)