如何解决winform控件的本地语言文本编码问题

How fix local language text encoding problems of winform controls

在 windowsForm Designer 中,我在窗体上放置了一个标签。为其文本写了一些土耳其语字符 属性。 text > "Giriş" 表示登录。

应用程序启动时,ş 字符显示不正确。某种编码问题

Windows10 有 2 个语言包 > 英语(美国)和土耳其语。英语是默认和当前使用的语言。我不想以编程方式更改设计元素的文本。我想使用 FormDesigner。

这是我在 Windows Form Designer

中看到的内容

这是我在 运行

时看到的

您必须按照 Microsoft's 示例设置 CurrentCultureCurrentUICulture

// C#
// Put the using statements at the beginning of the code module
using System.Threading;  
using System.Globalization;

// Put the following code before InitializeComponent()
// Sets the culture to French (France)
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

// Sets the UI culture to French (France)
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");

您可以在应用程序启动时设置一次。