Java tutorial
//package com.java2s; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { public static String urldecode(String paramString1, String paramString2) { if (paramString1 == null) return ""; try { String str = URLDecoder.decode(paramString1, paramString2); return str; } catch (UnsupportedEncodingException localUnsupportedEncodingException) { throw new RuntimeException(localUnsupportedEncodingException.getMessage(), localUnsupportedEncodingException); } } }