#C++ WinRT, WinUI 3 – Cyrillic letters written in XAML are displayed as garbage

4 messages · Page 1 of 1 (latest)

stark glade
#

Just created WinUI app, and I struggle to display cyrillics.
XAML:

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

    <StackPanel Orientation="Vertical" Spacing="10" HorizontalAlignment="Center" VerticalAlignment="Center" MinWidth="250">
        <TextBox x:Name="XTextBox" PlaceholderText="x"/>
        <TextBox x:Name="YTextBox" PlaceholderText="y"/>
        <Button x:Name="MyButton" Content="кириллица" Click="ButtonClick" HorizontalAlignment="Stretch"/>
        <TextBox x:Name="ResultTextBox" PlaceholderText="Result" IsReadOnly="True"/>
    </StackPanel>
</Window>

C++:

void MainWindow::ButtonClick(IInspectable const&, RoutedEventArgs const&)
{
    MyButton().Content(box_value(L"кириллица"));
}

When launching app the text is like on the first image, and after clicking on button is like on the second. I've tried setting default language to ru-ru in appxmanifest, but it didn't help. Is there some setting I need to tweak?

stark relicBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

stark relicBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.

stark glade
#

!solved