String url = "http://site.ru/search?q=" + URLEncoder.encode(search.getText().toString(), "UTF-8"); 

This code causes an UnsupportedEncodingException error. What is wrong here?

  • Can I have an error log? - Flippy

1 answer 1

 URLEncoder.encode( "urlParameterString", java.nio.charset.StandardCharsets.UTF_8.toString()); 
  • java.nio taxis) - Flippy
  • Google taxis;) - Alisha Nice
  • With a capital G; D - Flippy
  • not working (same thing - Govnokoder
  • Look here link link link - Alisha Nice