Previously it was done by

     URLDecoder.decode(s, charset.name());