title: Special characters in URL java not working
body: <p>I'm making a program that gets data from league of legends api, it analizes your current game and shows you your oponents names, ranks and stuff. But i have an issue because to get someone's rank i need to travel to a specific url with his nick in it. The problem is that some players put characters like å, à, è, ö, or stuff like that in their nicks, and when that happens my program stops working. I will show you part of the code that im using to do that:</p>
  
  <pre><code>getSummonerID2 = new JSONObject(IOUtils.toString(newURL("https://euw1.api.riotgames.com/lol/summoner/v3/summoners/by-name/"+ newPlayerNick[i] + "?api_key=" + APIKEY), Charset.forName("UTF-8")));
  </code></pre>
  
  <p>This is the error it throws: 
  java.io.IOException: Server returned HTTP response code: 400 for URL: <a href="https://euw1.api.riotgames.com/lol/summoner/v3/summoners/by-name/JegF%C3%A5rDetD%C3%A5rligt?api_key=" rel="nofollow noreferrer">https://euw1.api.riotgames.com/lol/summoner/v3/summoners/by-name/JegFårDetDårligt?api_key=</a>( My key, cant show it sry)</p>
  
  <p>It happened to me before with the spaces, because it looks like you cant even put spaces in a url, so the thing i did to solve that was:</p>
  
  <pre><code>newPlayerNick[i] = playerNick[i].replaceAll("\\s+","_");
  </code></pre>
  
  <p>That basically replaces every space with a _, so it works perfectly, but i cant replace an "å" with a normal "a" as they are different characters.</p>
  
  <p>So, do you know any solution for this? thank you so much guys.</p>