到底为什么会有一个“-”?显示为问号?
我的 WPF 应用程序正在读取文本文件并填充列表框。
每当我的文本被破折号(即“-”)包围时,记事本中的行将看起来像这样,例如“示例 - 文本”
当它在应用程序中显示它时,破折号变成问号!?!?!?
然后我有一个“导出”按钮,它将这些内容写回到文本文件中。当该符号被写回时,在记事本中它会变成一个正方形!?!?!?
到底为什么会发生这种情况?请看截图
My WPF application is reading a text file and populating a listbox.
Whenever I have text surrounded by a dash symbol i.e. "-", the line in notepad will look like this for e.g. "SAMPLE - TEXT"
When it displays it in the application, the dash turns into a question mark !?!?!?
I then have an Export button, which writes these back to a textfile. When that symbol is written back, in notepad it turns into a square!?!?!?
Why on earth is this happening? Please see the screenshot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它可能不是破折号,而是一些看起来像破折号的 unicode 字符。
按键盘上的减号键并重新输入。
It's probably not a dash, it's some unicode character that looks like a dash.
Press the minus key on your keyboard and retype it.
它很可能是一个短破折号或长破折号,而不是真正的连字符或减号。
如果排字工发现你使用了错误的术语,他们很可能会试图追踪你并将你打死:-)
Most likely it's an en dash or em dash rather than a real hyphen or minus symbol.
Typesetters will most likely try to track you down and beat you to death if they discover you're using the wrong term :-)