[英]Can't insert unicode symbol in C# resource file
I have a WPF app and need to display the "white star" (u+2606) character in a label. 我有一个WPF应用程序,需要在标签中显示“白星”(u + 2606)字符。 Of course if I set the string in code with "\☆" it works fine.
当然如果我在代码中用“\\ u2606”设置字符串就可以了。 However, I can't figure out how to put this into the resource file.
但是,我无法弄清楚如何将其放入资源文件中。 When I type ALT+2606 it inputs a period instead of the start.
当我输入ALT + 2606时,它输入一个句点而不是开始。 What am I doing wrong?
我究竟做错了什么?
From this SO answer - try inserting from the Character Map. 从这个SO答案 - 尝试从字符映射插入。
To launch the Character map from the command prompt, type charmap
. 要从命令提示符启动字符映射,请键入
charmap
。
Select Segoe-UI-Symbol and type 2606 in the Unicode box. 选择Segoe-UI-Symbol并在Unicode框中键入2606。 Click on the star, then Click the Select button and then the Copy button will put it into your clipboard.
单击星号,然后单击“选择”按钮,然后“复制”按钮将其放入剪贴板。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.