title: Bug with adjusting RTF in Winforms when using Windows-wide beta UTF-8 support feature
body: <p>I think I've found a bug in Windows or .NET and am looking for a workaround.</p>
  
  <p>To reproduce the problem, first enable the Windows feature "Beta: Use Unicode UTF-8 for worldwide language support". </p>
  
  <p><a href="https://i.stack.imgur.com/4MEfy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4MEfy.png" alt="enter image description here"></a></p>
  
  <p>You may need to reboot the machine.</p>
  
  <p>Now simply create two RichTextBox components in Winforms/C#, and then add the event:</p>
  
  <pre><code>    private void richTextBox1_TextChanged(object sender, EventArgs e)
      {
          string s = richTextBox1.Rtf;
          richTextBox2.Rtf = s;
      }
  </code></pre>
  
  <p>Finally, run the program and simply type something into the first RichTextBox, and it'll crash with the message "File format is not valid" when it tries to write to the <code>richTextBox2.Rtf</code>. It won't crash if the Windows feature "Beta: Use Unicode UTF-8 for worldwide language support" is disabled.</p>
  
  <p>I'm thinking of two potential workarounds here:</p>
  
  <p>1: Somehow disable within the C# app the entire "Beta: Use Unicode UTF-8 for worldwide language support" feature and pretend it was never enabled in the first place.</p>
  
  <p>2: Somehow edit the RTF string to comply with whatever unknown requirements the new RTF should have before adjusting the RTF of the other RichTextBox. This seems counter-intuitive considering the first RichTextBox should have exactly the same RTF anyway, but anyway...</p>
  
  <hr>
  
  <pre><code>************* Exception Text **************
  System.ArgumentException: File format is not valid.
  at System.Windows.Forms.RichTextBox.StreamIn(Stream data, Int32 flags)
  at System.Windows.Forms.RichTextBox.StreamIn(String str, Int32 flags)
  at System.Windows.Forms.RichTextBox.set_Rtf(String value)
  at unicodeTesting.Form1.richTextBox1_TextChanged(Object sender, EventArgs e) in D:\Code\c#\_tests\unicodeTesting\Form1.cs:line 30
  at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
  at System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
  at System.Windows.Forms.TextBoxBase.WmReflectCommand(Message&amp; m)
  at System.Windows.Forms.TextBoxBase.WndProc(Message&amp; m)
  at System.Windows.Forms.RichTextBox.WmReflectCommand(Message&amp; m)
  at System.Windows.Forms.RichTextBox.WndProc(Message&amp; m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  </code></pre>