Special characters (like Ü,Ä,Ö) are not correctly displayed at runtime in case of using Template10

↘锁芯ラ 提交于 2019-12-24 00:59:44

问题


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

Runtime


回答1:


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

XAML: x:Uid="..."

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




回答2:


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 Ü



来源:https://stackoverflow.com/questions/35135623/special-characters-like-%c3%9c-%c3%84-%c3%96-are-not-correctly-displayed-at-runtime-in-case-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!