public static void main(String[] args) throws UnsupportedEncodingException { String s = "%E9%BB%98%E9%BB%98%E5%A4%A7"; s = s.replace("%", ""); System.out.println(s); s = s.replace(" ", ""); byte[] baKeyword = new byte[s.length() / 2]; for (int i = 0; i < baKeyword.length; i++) { try { baKeyword[i] = (byte) (0xff & Integer.parseInt( s.substring(i * 2, i * 2 + 2), 16)); } catch (Exception e) { e.printStackTrace(); } } try { s = new String(baKeyword, "utf-8"); System.out.println(s); } catch (Exception e1) { e1.printStackTrace(); }}