Here you can find the source of decodeToUtf8(String uri)
uri
replacing '+' with ' ' and percent encoded characters with their utf equivalents.
public static String decodeToUtf8(String uri) throws URISyntaxException
//package com.java2s; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; import java.net.URLDecoder; public class Main { /**/*ww w.j a va 2 s . c om*/ * Decodes <code>uri</code> replacing '+' with ' ' and percent encoded characters * with their utf equivalents. * * @return copy of original uri if there no characters had to be decoded */ public static String decodeToUtf8(String uri) throws URISyntaxException { try { return URLDecoder.decode(uri, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } catch (IllegalArgumentException iae) { throw new URISyntaxException(uri, "invalid url"); } } }