String str11 = "你好123abc"; try { String result = URLEncoder.encode(str11, "utf-8"); Log.e(TAG,"URL编码:"+result);// 输出 URL编码:%E4%BD%A0%E5%A5%BD123abc } catch (UnsupportedEncodingException e) { e.printStackTrace(); }
Android 中文URL转码
最新推荐文章于 2023-01-09 10:04:13 发布