title: Is UTF-16 a superset of ASCII? If yes, why is UTF-16 incompatible with ASCII according to the HTML Standard?
body: <p>According to the <a href="https://en.wikipedia.org/wiki/UTF-16" rel="nofollow noreferrer">Wikipedia article on UTF-16</a>, "...[UTF-16] is also the only web-encoding incompatible with ASCII." (at the end of the abstract.) This statement refers to the HTML Standard. <strong>Is this a wrong statement?</strong></p>
  
  <p>I'm mainly a C# / .NET dev, and .NET as well as .NET Core uses UTF-16 internally to represent strings. I'm pretty certain that UTF-16 is a superset of ASCII, as I can easily write code that displays all ASCII characters:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public static void Main()
  {
      for (byte currentAsciiCharacter = 0; currentAsciiCharacter &lt; 128; currentAsciiCharacter++)
      {
          Console.WriteLine($"ASCII character {currentAsciiCharacter}: \"{(char) currentAsciiCharacter}\"");
      }
  }
  </code></pre>
  
  <p>Sure, the control characters will mess up the console output, but I think my statement is clear: the lower 7 bits of a 16 bit <code>char</code> take the corresponding ASCII code point, while the upper 9 bits are zero. Thus UTF-16 should be a superset of ASCII in .NET.</p>
  
  <p>I tried to find out why the HTML Standard says that UTF-16 is incompatible to ASCII, but it seems like <a href="https://html.spec.whatwg.org/dev/infrastructure.html#encoding-terminology" rel="nofollow noreferrer">they simply define it that way</a>:</p>
  
  <blockquote>
    <p>An ASCII-compatible encoding is any encoding that is not a UTF-16 encoding.</p>
  </blockquote>
  
  <p>I couldn't find any explanations why UTF-16 is not compatible in their spec.</p>
  
  <p>My detailed questions are:</p>
  
  <ol>
  <li>Is UTF-16 actually compatible to ASCII? Or did I miss something here?</li>
  <li>If it is compatible, why does the HTML Standard say it's not compatible? Maybe because of byte ordering?</li>
  </ol>