title: IIS incorrectly decodes URLs containing characters outside the system locale
body: <p>It seems that IIS incorrectly delivers the request URL to a web application if the URL contains UTF-8 encoded characters, which are not supported by the current system locale. All "unsupported" characters are replaced by question marks ('?').</p>
  
  <p>Example: The system locale is set to Norwegian.
  The following URL works fine:</p>
  
  <pre><code>/myapp/Blåbærsyltetøy/
  </code></pre>
  
  <p>The following URL does not work:</p>
  
  <pre><code>/myapp/черничный-джем/
  </code></pre>
  
  <p>In both URLs, non-ASCII characters are encoded as UTF-8 and then percent-encoded, so the actual URLs look like this:</p>
  
  <pre><code>/myapp/Bl%C3%A5b%C3%A6rsyltet%C3%B8y/
  /myapp/%D1%87%D0%B5%D1%80%D0%BD%D0%B8%D1%87%D0%BD%D1%8B%D0%B9-%D0%B4%D0%B6%D0%B5%D0%BC/
  </code></pre>
  
  <p>The application uses two ways of handling requests:</p>
  
  <ul>
  <li>wfastcgi + Python</li>
  <li>ISAPI + C++</li>
  </ul>
  
  <p>Both are suffering from the same problem, and both have no problem if the URL only contains characters that are supported by the system locale.</p>
  
  <p>In the case of ISAPI, it looks like <code>EXTENSION_CONTROL_BLOCK::lpszPathInfo</code> already delivers a percent-decoded URL, where all "unsupported" characters have been replaced by question marks. The <code>EXTENSION_CONTROL_BLOCK::lpszPathInfo</code> attribute is a multi-byte character string, and there is no wide-character string version of this structure.</p>
  
  <p>Is there a way to get the original, percent-encoded URL or prevent IIS from decoding URLs to work around the problem?</p>