Here you can find the source of escapeWiki(String s)
public static String escapeWiki(String s)
//package com.java2s; //License from project: Open Source License import java.io.UnsupportedEncodingException; import java.net.URLEncoder; public class Main { public static String escapeWiki(String s) { s = s.replaceAll(" ", "_"); s = s.replaceAll("\\t", "_"); try {/*from w w w . java2 s . co m*/ s = URLEncoder.encode(s, "UTF8"); return s; } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return ""; } }