RichTextBox.RTF setter抛出System.ArgumentException。文件格式在Windows版本1803中无效

问题描述 投票:0回答:1

模拟以下方案以重现崩溃:

  1. 启用Beta:unicode UTF-8,支持全球语言(启用开始=>区域和语言设置=>相关设置 - >附加日期,时间和区域设置=>区域 - >更改日期,时间或数字格式=>选择管理选项卡=>单击“更改系统区域设置”。
  2. 检查Beta:用于全球语言支持的unicode UTF-8复选框
  3. 重启系统
  4. 在Windows窗体中,Application =>添加一个表单,RichTextBox,Button和一个标签OnButtonClick =>添加下面的行 richTextBox1.SelectAll(); richTextBox1.Rtf = richTextBox1.SelectedRtf; //Leads Crash System.ArgumentException: File format is not valid. label1.Text = "RichTextBox1.Rtf = " + richTextBox1.Rtf;
  5. 如果我们UnCheck Beta:unicode UTF-8用于全球语言支持,并重新启动系统则没有问题。

在Windows版本1803中观察到问题

对此用例的任何帮助表示赞赏

windows version richtextbox argumentexception
1个回答
1
投票

这也是microsoft build 1803和1809的一个问题。可以在此处找到解决方案。

https://developercommunity.visualstudio.com/content/problem/544623/issue-caused-by-unicode-utf-8-for-world-wide-langu.html

© www.soinside.com 2019 - 2024. All rights reserved.