title: How to convert string to URL in swift
body: <p>I want to convert below String to URL </p>
  
  <p><code>www.mydomain.com/key=अक्षय</code></p>
  
  <p>I tried <code>let urlToSend = URL(string: "www.mydomain.com/key=अक्षय")!</code> but it returns nil. </p>
  
  <p>I'm getting that 'अक्षय' keyword from textField, it could be in any local language. </p>
  
  <p>It works fine with English but not working with local language.</p>
  
  <p>I used <code>let url = URL(string: "www.mydomain.com")?.appendingPathComponent("key=अक्षय")</code> it gives www.mydomain.com/key=%E0%A4%85%E0%A4%95%E0%A5%8D%E0%A4%B7%E0%A4%AF</p>
  
  <p>but now I want to 
  <code>www.mydomain.com/key=%E0%A4%85%E0%A4%95%E0%A5%8D%E0%A4%B7%E0%A4%AF</code> to <code>www.mydomain.com/key=अक्षय</code></p>