Android examples for java.net:URL
encode URL by UTF-8
import java.net.URLEncoder; public class Main { public static String enCodeRUL(String str) { try {// w w w. jav a 2 s . c o m return URLEncoder.encode(str, "UTF-8"); } catch (Exception ex) { } return str; } }