0

I have a problem with displaying the Russian language in the Win UI 3 application

enter image description here

Here is the MainWindow.xaml file

<Window
    x:Class="test.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:test"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="32" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <NavigationView
            Grid.Row="1"
            IsBackButtonVisible="Collapsed"
            IsSettingsVisible="False">
            <StackPanel x:Name="TitleBar" VerticalAlignment="Center">
                <TextBlock Text="привет" />
                <TextBox
                    Width="300"
                    Margin="8"
                    PlaceholderText="привет" />
                <TextBox
                    Width="300"
                    Margin="8"
                    PlaceholderText="привет" />
            </StackPanel>
        </NavigationView>
    </Grid>
</Window>

Actually, I'm not sure if the problem is in this file, but I have no other ideas

MIkhail
  • 49
  • 8
  • I used your code in a plain WinUI 3 app project but "привет" are displayed correctly. What happens when if you use plain english? – Andrew KeepCoding Nov 20 '22 at 13:33
  • then everything is displayed correctly – MIkhail Nov 20 '22 at 14:13
  • I guess it's related to encoding but I'm not familiar with encoding in deep, sorry. [This](https://stackoverflow.com/questions/49623731/what-is-the-default-encoding-for-source-files-in-visual-studio-2017) might help though. – Andrew KeepCoding Nov 21 '22 at 01:14

1 Answers1

1

You can try to change the encoding of visual studio, or install the Force UTF-8 visual studio extension

laohan
  • 55
  • 5