Why WinUI3 textblock cannot display Unicode characters?

aluzi liu 486 Reputation points
2023-04-19T07:22:33.7266667+00:00

I create a new WinUI3 project, put a TextBlock in window:

<TextBlock>物語の進行に合わせて、入手したアイテムで敵と戦いながら</TextBlock>

then build project and run, it shows me: wpf-01

What's wrong with the textblock control?

Windows development | Windows App SDK
Developer technologies | XAML
Developer technologies | XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jeanine Zhang-MSFT 11,356 Reputation points Microsoft External Staff
    2023-04-20T01:36:48.6466667+00:00

    Hello, Welcome to Microsoft Q&A! I suggest you could try to set the encoding to Unicode.

    File -> Save ….xaml As… -> Save with Encoding -> Codepage 65001

    User's image

    User's image

    User's image

    Result:

    User's image

    Thank you.

    Jeanine


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.