问题
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 Ü
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