Special characters (like Ü,Ä,Ö) are not correctly

2019-07-08 16:43发布

Have an issue by using the Template10 for UWP apps. If i want to display special characters at design time everything seems to be ok. At runtime special characters would not be displayed correctly as you can see in screenshots.

<!--  page header  -->
    <controls:PageHeader Content="Übersicht">
        <controls:PageHeader.SecondaryCommands>
            <AppBarButton Click="{x:Bind ViewModel.GotoSettings}" Label="Settings" />
            <AppBarButton Click="{x:Bind ViewModel.GotoPrivacy}" Label="Privacy" />
            <AppBarButton Click="{x:Bind ViewModel.GotoAbout}" Label="About" />
        </controls:PageHeader.SecondaryCommands>
    </controls:PageHeader>

For example "Übersicht" -> VisualStudio Designer "Übersicht" -> Runtime "?bersicht"

Designer view

enter image description here

Runtime

enter image description here

2条回答
ら.Afraid
2楼-- · 2019-07-08 17:21

Did you set your PrimaryLanguageOverride?

You're dealing with UTF-8 by default, so I'd normally expect it to be fine but in this instance if you don't wish to set your localization you can substitute unicode &#220; to reliably display Ü

查看更多
太酷不给撩
3楼-- · 2019-07-08 17:34

If you use string resources (.resw files), the characters will also appear correctly:

XAML: x:Uid="..."

C#: ResourceLoader.GetForViewIndependentUse().GetString("...");

查看更多
登录 后发表回答