title: UTF-8 POST received by IIS as ASCII
body: <p>I have a webpage (IIS version 10.0.16299.15 under Windows 10) whose head element contains:</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  </code></pre>
  
  <p>From this page I do a POST using jQuery</p>
  
  <pre><code>$.ajax({
      contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
      type: "POST",
      url: "hierarchy.lib.asp?action=save",
      data: {
          nameFrench: $("#frenchName").val()
      },
  
      ...
  </code></pre>
  
  <p>I know that UTF-8 is the default, but I explicitly set it while trying to fix this issue.</p>
  
  <p>The POSTed value is the word "Écrou". A break point in the Javascript shows "Écrou" is being posted.</p>
  
  <p>When I receive the posted data, the result seems to be ASCII encoded.</p>
  
  <pre><code>dim value: value = request.form("nameFrench")
  </code></pre>
  
  <p>The variable <code>value</code> now contains value "Ã‰crou" (checked while debugging with Visual Studio).</p>
  
  <p>Could IIS incorrectly be encoding the request collection with ASCII-encoded values instead of the POSTed UTF-8 strings?</p>
  
  <p>I know there was a bug like this in IIS 7.5:
  <a href="https://www.redolive.com/utah-web-designers-blog/how-to-fix-utf-8charset-problem-with-iis-7-5-and-php-fastcgi/" rel="nofollow noreferrer">https://www.redolive.com/utah-web-designers-blog/how-to-fix-utf-8charset-problem-with-iis-7-5-and-php-fastcgi/</a></p>
  
  <p>Thoughts?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>If I replace:</p>
  
  <pre><code>&lt;%@ Language="VBScript" %&gt;
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>&lt;%@ Language="VBScript" codepage=65001 %&gt;
  </code></pre>
  
  <p>Then my value POSTed from jQuery's ajax is correct when received at server-side. However, this change breaks POSTing using standard HTML forms even from web pages that use the meta tag to declare they are UTF-8 pages.</p>
  
  <p>I tried changing the Ajax call to POST just like the windows forms:</p>
  
  <pre><code>contentType: "application/x-www-form-urlencoded",
  </code></pre>
  
  <p>But that doesn't fix the issue.</p>
  
  <p>I also tried with:</p>
  
  <pre><code>contentType: 'Content-type: text/plain; charset=iso-8859-1',
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>contentType: 'Content-type: text/plain; charset=windows-1252',
  </code></pre>
  
  <p>When I POST with jQuery ajax using 8859 (having changed nothing else except the html meta tag) the POST is completely empty, no body is sent to the server at all!</p>
  
  <p>On server side if I check <code>Session.CodePage</code> or <code>response.CodePage</code> they both return 1252.</p>