Java String Decode by Charset decodeWithDefaultCharSet(String urlToDecode)

Here you can find the source of decodeWithDefaultCharSet(String urlToDecode)

Description

decode With Default Char Set

License

Open Source License

Declaration

public static String decodeWithDefaultCharSet(String urlToDecode) 

Method Source Code

//package com.java2s;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.nio.charset.Charset;

public class Main {
    public static String decodeWithDefaultCharSet(String urlToDecode) {
        try {/*from w ww  . java2s  .  c  o  m*/
            return URLDecoder.decode(urlToDecode, Charset.defaultCharset().name());
        } catch (UnsupportedEncodingException e) {
            return urlToDecode;
        }
    }
}

Related

  1. decode(String value, Charset charset)
  2. decodeCharset(String value, String charset)
  3. decodeComponent(final String s, final Charset charset)
  4. decodeFormFields(final String content, final Charset charset)
  5. decodeURL(@Nullable String str, Charset charSet)
  6. getCharsetDecoder(String charsetName)
  7. getDecoder(Charset charset)
  8. getDecoder(Charset charset)
  9. getDecoder(String charset)