import java.net.URLEncoder; public class MainClass { public static void main(String[] args) throws Exception { System.out.println(URLEncoder.encode("A~B~C~D", "UTF-8")); } }
A%7EB%7EC%7ED