地址栏url汉字解码

	/**
	 * 浏览器地址栏url汉字解码
	 * 
	 * @author zw
	 * @date  2013-4-24
	 * @param args
	 * @return void
	 */
	public static void main(String[] args) {
		try {
			System.out.println(URLDecoder.decode("%B5%E7%D7%D3", "GBK"));
			System.out.println(URLDecoder.decode("%CE%E5%BD%F0%A1%A2%B9%A4%BE%DF%3A%C3%C5%B4%B0%CE%E5%BD%F0%3A%C0%AD%CA%D6", "GBK"));
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
	}

 

你可能感兴趣的:(url)