title: Why is WebView unable to open some local URLs (Android)?
body: <p>I have a <code>WebView</code> that I'm using to open some files stored in the <code>assets/</code> directory of my project. It works fine for most of the files, but there's one in particular (and I'm sure others I haven't found) that it just <strong>will not</strong> open. </p>
  
  <p>The file I'm having problems with is named: </p>
  
  <pre><code>"assets/ContentRoot/Photos/XXX Software Logo - jpg - 75%.JPG"
  </code></pre>
  
  <p>When I pass it to <code>WebView</code>, and it shows the error page, it shows it as: </p>
  
  <pre><code>"file:///android_asset/ContentRoot/Photos/XXX%20Software%20Logo%20-%20jpg%20-%2075%.JPG"
  </code></pre>
  
  <p>I then tried running <code>URLEncoder.encode()</code> on it and got the error page with the URL presented as: </p>
  
  <pre><code>"file:///android_asset/ContentRoot/Photos/XXX+Software+Logo+-+jpg+-+75%.JPG"
  </code></pre>
  
  <p>Neither of these URLs were able to open the file (and they both look okay to me). Anyone have any ideas?</p>
  
  <p><strong>UPDATE:</strong> If I encode the <code>%</code> by hand (using <code>%25</code>, as commonsware.com suggested) then it loads the image, but it tries to parse it as text, not as an image, so I just get a lot of (basically) garbage.</p>
  
  <p><img src="https://imgur.com/zgZSj.png" alt="Hosted by imgur.com"></p>
  
  <p>Also, referring to the image in an HTML document with a relative URL isn't working (probably because it's not being parsed as an image?):</p>
  
  <pre><code>&lt;img src="../Photos/XXX%20Software%20Logo%20-%20jpg%20-%2075%.JPG" /&gt;
  &lt;img src="../Photos/XXX%20Software%20Logo%20-%20jpg%20-%2075%25.JPG" /&gt;
  </code></pre>