title: URL encoding is getting failed for special character. #Android
body: <p>I'm working on a solution where need to <strong>encode</strong> string into <strong>utf-8</strong> format, this string nothing but device name that I'm reading using <code>BluetoothAdapter.getDefaultAdapter().name</code>.</p>
  <p>For one of sampple I got a string like <code>ABC-＆</code> and <a href="https://www.urlencoder.org/" rel="nofollow noreferrer">encoding</a> this returned <code>ABC-%EF%BC%86</code> instead of <code>ABC-%26</code>. It was weird until further debugging which helped to identify that there is difference between <code>&amp; and ＆</code>. Second one is some other character which is failing to encoded as expected.</p>
  <p><code>&amp; and ＆ both are different.</code></p>
  <p>For encoding tried both <code>URLEncoder.encode(input, &quot;utf-8&quot;)</code> and <code>Uri.encode(input, &quot;utf-8&quot;)</code> but nothing worked.</p>
  <p>This is just an example, there might be other character which may look like same as actual character but failed to encode. Now question are:</p>
  <ol>
  <li>Why this difference, after all it is reading of some data from device using standard SDK API.</li>
  <li>How can fix this be fixed. Find and replace with actual character could be a approach but scope is limited, there might be other unknown character.</li>
  </ol>
  <p>Any suggestion around !!</p>