标签:str void cep urlencode out gen [] class public
public static void main(String[] args) { String a = "欢迎你"; try { //编码 String b = URLEncoder.encode(a, "UTF-8"); System.out.println(b); //解码 String c= URLDecoder.decode(b, "UTF-8"); System.out.println(c); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
标签:str void cep urlencode out gen [] class public
原文地址:https://www.cnblogs.com/qqyong123/p/9041020.html